summaryrefslogtreecommitdiffstats
path: root/methods.py
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2021-07-13 15:31:38 +0200
committerGitHub <noreply@github.com>2021-07-13 15:31:38 +0200
commit8747f2565392f4d4be5cc6c8658f6443763ea618 (patch)
treec6db822e48e87d4179d2e231d81e0b505d1488db /methods.py
parentb44b277f6f2f22124c47d63551591056791474c0 (diff)
parent5ad4f26659b435add8c4d36009be6a2222a0a624 (diff)
downloadredot-engine-8747f2565392f4d4be5cc6c8658f6443763ea618.tar.gz
Merge pull request #50381 from reduz/implement-disable-classes
Implement the ability to disable classes
Diffstat (limited to 'methods.py')
-rw-r--r--methods.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/methods.py b/methods.py
index 1afd1ca0d4..fd9978657e 100644
--- a/methods.py
+++ b/methods.py
@@ -231,6 +231,18 @@ def is_module(path):
return True
+def write_disabled_classes(class_list):
+ f = open("core/disabled_classes.gen.h", "w")
+ f.write("/* THIS FILE IS GENERATED DO NOT EDIT */\n")
+ f.write("#ifndef DISABLED_CLASSES_GEN_H\n")
+ f.write("#define DISABLED_CLASSES_GEN_H\n\n")
+ for c in class_list:
+ cs = c.strip()
+ if cs != "":
+ f.write("#define ClassDB_Disable_" + cs + " 1\n")
+ f.write("\n#endif\n")
+
+
def write_modules(modules):
includes_cpp = ""
preregister_cpp = ""