diff options
Diffstat (limited to 'editor/editor_node.cpp')
-rw-r--r-- | editor/editor_node.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 6f6287ccb5..3569cd411d 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -64,6 +64,7 @@ #include "servers/navigation_server_2d.h" #include "servers/navigation_server_3d.h" #include "servers/physics_server_2d.h" +#include "servers/rendering/rendering_device.h" #include "editor/audio_stream_preview.h" #include "editor/debugger/editor_debugger_node.h" @@ -97,6 +98,7 @@ #include "editor/import/resource_importer_layered_texture.h" #include "editor/import/resource_importer_obj.h" #include "editor/import/resource_importer_scene.h" +#include "editor/import/resource_importer_shader_file.h" #include "editor/import/resource_importer_texture.h" #include "editor/import/resource_importer_texture_atlas.h" #include "editor/import/resource_importer_wav.h" @@ -147,6 +149,7 @@ #include "editor/plugins/script_editor_plugin.h" #include "editor/plugins/script_text_editor.h" #include "editor/plugins/shader_editor_plugin.h" +#include "editor/plugins/shader_file_editor_plugin.h" #include "editor/plugins/skeleton_2d_editor_plugin.h" #include "editor/plugins/skeleton_3d_editor_plugin.h" #include "editor/plugins/skeleton_ik_3d_editor_plugin.h" @@ -708,6 +711,11 @@ void EditorNode::_sources_changed(bool p_exist) { if (waiting_for_first_scan) { waiting_for_first_scan = false; + // Reload the global shader variables, but this time + // loading texures, as they are now properly imported. + print_line("done scanning, reload textures"); + RenderingServer::get_singleton()->global_variables_load_settings(true); + // Start preview thread now that it's safe. if (!singleton->cmdline_export_mode) { EditorResourcePreview::get_singleton()->start(); @@ -5710,6 +5718,10 @@ EditorNode::EditorNode() { import_obj.instance(); ResourceFormatImporter::get_singleton()->add_importer(import_obj); + Ref<ResourceImporterShaderFile> import_shader_file; + import_shader_file.instance(); + ResourceFormatImporter::get_singleton()->add_importer(import_shader_file); + Ref<ResourceImporterScene> import_scene; import_scene.instance(); ResourceFormatImporter::get_singleton()->add_importer(import_scene); @@ -6627,6 +6639,7 @@ EditorNode::EditorNode() { add_editor_plugin(VersionControlEditorPlugin::get_singleton()); add_editor_plugin(memnew(ShaderEditorPlugin(this))); + add_editor_plugin(memnew(ShaderFileEditorPlugin(this))); add_editor_plugin(memnew(VisualShaderEditorPlugin(this))); add_editor_plugin(memnew(Camera3DEditorPlugin(this))); |