diff options
author | elasota <ejlasota@gmail.com> | 2018-09-14 21:54:59 -0400 |
---|---|---|
committer | elasota <ejlasota@gmail.com> | 2018-09-14 22:30:48 -0400 |
commit | f5c7d644923c318a1020401df068cf072427ae45 (patch) | |
tree | 08cdc944e69e36f5c8fb9f67f38a285034f39930 /editor | |
parent | 06c8b5a4ffb0ab6787edf071463f17df522b3e79 (diff) |
Don't open VisualShaders in the text shader editor, and don't support saving them with the "shader" extension.
Diffstat (limited to 'editor')
-rw-r--r-- | editor/plugins/shader_editor_plugin.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/plugins/shader_editor_plugin.cpp b/editor/plugins/shader_editor_plugin.cpp index 51e58b712e..361271af89 100644 --- a/editor/plugins/shader_editor_plugin.cpp +++ b/editor/plugins/shader_editor_plugin.cpp @@ -426,7 +426,7 @@ void ShaderEditor::ensure_select_current() { void ShaderEditor::edit(const Ref<Shader> &p_shader) { - if (p_shader.is_null()) + if (p_shader.is_null() || !p_shader->is_text_shader()) return; shader = p_shader; @@ -606,7 +606,7 @@ void ShaderEditorPlugin::edit(Object *p_object) { bool ShaderEditorPlugin::handles(Object *p_object) const { Shader *shader = Object::cast_to<Shader>(p_object); - return shader != NULL; + return shader != NULL && shader->is_text_shader(); } void ShaderEditorPlugin::make_visible(bool p_visible) { |