1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-06 12:20:30 +00:00

Don't open VisualShaders in the text shader editor, and don't support saving them with the "shader" extension.

This commit is contained in:
elasota
2018-09-14 21:54:59 -04:00
parent 06c8b5a4ff
commit f5c7d64492
5 changed files with 19 additions and 4 deletions

View File

@@ -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) {