From 197fbbe6ce27c5e0c6c5f5a4983c3ffe58ae7258 Mon Sep 17 00:00:00 2001 From: yawn831831 Date: Sat, 28 Jun 2025 01:12:32 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9Eblacklist?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SourceCodeGenerator.cs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/SourceCodeGenerator.cs b/SourceCodeGenerator.cs index 3131fe7..e173166 100644 --- a/SourceCodeGenerator.cs +++ b/SourceCodeGenerator.cs @@ -62,6 +62,8 @@ namespace SourceCodeGeneratorUbtPlugin private const string HeaderSuffix = ".header.inl"; + private readonly HashSet ClassBlacklist = new(); + public SourceCodeGenerator(IUhtExportFactory factory) { Factory = factory; @@ -119,6 +121,17 @@ namespace SourceCodeGeneratorUbtPlugin ExportModule.Add(value); } } + + if (SettingConfigHierarchySection.TryGetValues("ClassBlacklist", out var BlacklistValues)) + { + foreach (var value in BlacklistValues) + { + if (!string.IsNullOrEmpty(value)) + { + ClassBlacklist.Add(value); + } + } + } } } @@ -179,7 +192,8 @@ namespace SourceCodeGeneratorUbtPlugin /// True if the class should be exported, false if not protected virtual bool CanExportClass(UhtClass classObj) { - return !classObj.ClassFlags.HasAnyFlags(EClassFlags.Interface) && + return !ClassBlacklist.Contains(classObj.SourceName) && + !classObj.ClassFlags.HasAnyFlags(EClassFlags.Interface) && IsClassTypeSupported(classObj); }