mirror of
https://github.com/godotengine/godot.git
synced 2024-12-27 11:24:59 +08:00
7c11a1b162
The functionality is similar to how `doc_classes` are retrieved per module. The build system will search for custom icons path defined per module via `get_icons_path()` method in `config.py` or default icons path. If such paths don't exist, only the editor's own icons will be built. Most module icons were moved from editor/icons to respective modules.
22 lines
668 B
Python
22 lines
668 B
Python
#!/usr/bin/env python
|
|
|
|
Import('env')
|
|
|
|
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
|
|
|
|
# Editor's own icons
|
|
icon_sources = Glob("*.svg")
|
|
|
|
# Module icons
|
|
for module_icons in env.module_icons_paths:
|
|
icon_sources += Glob('#' + module_icons + "/*.svg")
|
|
|
|
env.Alias('editor_icons', [env.MakeEditorIconsBuilder('#editor/editor_icons.gen.h', icon_sources)])
|