summaryrefslogtreecommitdiff
path: root/editor/plugins/shader_editor_plugin.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-11-04 14:18:27 +0100
committerGitHub <noreply@github.com>2021-11-04 14:18:27 +0100
commitc4f29b078ab18325dac3558bce9111f6a6870d90 (patch)
treed5df3380b1c5bf8180e6e620df7300135abb0214 /editor/plugins/shader_editor_plugin.cpp
parenta302006f86f855c7f2a5fec97f092f9d7f1e8c6c (diff)
parente393c2a7348d96587e15af17c72ebeff719d4be3 (diff)
Merge pull request #50352 from KoBeWi/internal_stuff
Diffstat (limited to 'editor/plugins/shader_editor_plugin.cpp')
-rw-r--r--editor/plugins/shader_editor_plugin.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/editor/plugins/shader_editor_plugin.cpp b/editor/plugins/shader_editor_plugin.cpp
index 2731582288..9d2b4c88c5 100644
--- a/editor/plugins/shader_editor_plugin.cpp
+++ b/editor/plugins/shader_editor_plugin.cpp
@@ -482,8 +482,7 @@ void ShaderEditor::_check_for_external_edit() {
return;
}
- // internal shader.
- if (shader->get_path() == "" || shader->get_path().find("local://") != -1 || shader->get_path().find("::") != -1) {
+ if (shader->is_built_in()) {
return;
}
@@ -530,7 +529,7 @@ void ShaderEditor::save_external_data(const String &p_str) {
}
apply_shaders();
- if (shader->get_path() != "" && shader->get_path().find("local://") == -1 && shader->get_path().find("::") == -1) {
+ if (!shader->is_built_in()) {
//external shader, save it
ResourceSaver::save(shader->get_path(), shader);
}