summaryrefslogtreecommitdiff
path: root/editor/icons/SCsub
diff options
context:
space:
mode:
Diffstat (limited to 'editor/icons/SCsub')
-rw-r--r--editor/icons/SCsub23
1 files changed, 14 insertions, 9 deletions
diff --git a/editor/icons/SCsub b/editor/icons/SCsub
index b39c74c66a..dd4243d750 100644
--- a/editor/icons/SCsub
+++ b/editor/icons/SCsub
@@ -1,21 +1,26 @@
#!/usr/bin/env python
-Import('env')
+Import("env")
+
+import os
-from platform_methods import run_in_subprocess
import editor_icons_builders
-make_editor_icons_builder = Builder(action=run_in_subprocess(editor_icons_builders.make_editor_icons_action),
- suffix='.h',
- src_suffix='.svg')
-env['BUILDERS']['MakeEditorIconsBuilder'] = make_editor_icons_builder
+env["BUILDERS"]["MakeEditorIconsBuilder"] = Builder(
+ action=env.Run(editor_icons_builders.make_editor_icons_action, "Generating editor icons header."),
+ suffix=".h",
+ src_suffix=".svg",
+)
# Editor's own icons
icon_sources = Glob("*.svg")
# Module icons
-for module_icons in env.module_icons_paths:
- icon_sources += Glob('#' + module_icons + "/*.svg")
+for path in env.module_icons_paths:
+ if not os.path.isabs(path):
+ icon_sources += Glob("#" + path + "/*.svg") # Built-in.
+ else:
+ icon_sources += Glob(path + "/*.svg") # Custom.
-env.Alias('editor_icons', [env.MakeEditorIconsBuilder('#editor/editor_icons.gen.h', icon_sources)])
+env.Alias("editor_icons", [env.MakeEditorIconsBuilder("#editor/editor_icons.gen.h", icon_sources)])