summaryrefslogtreecommitdiff
path: root/servers/rendering/shader_language.cpp
diff options
context:
space:
mode:
authorYuri Roubinsky <chaosus89@gmail.com>2022-01-13 20:37:27 +0300
committerGitHub <noreply@github.com>2022-01-13 20:37:27 +0300
commitd13c3c92965980aacbf94007d94a56aa92ebbb4e (patch)
tree9a2b76fdf76b8f9064462649efa1793b3e9c5f86 /servers/rendering/shader_language.cpp
parent2dee116ba7a2aafe303229c5f15abfd6674e56bf (diff)
parent4201af664908dbbca8962b7900bc94e5ac6b62b9 (diff)
Merge pull request #56757 from Chaosus/shader_fix_constant_completion
Diffstat (limited to 'servers/rendering/shader_language.cpp')
-rw-r--r--servers/rendering/shader_language.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/servers/rendering/shader_language.cpp b/servers/rendering/shader_language.cpp
index 8a65faea61..a03ba9a02a 100644
--- a/servers/rendering/shader_language.cpp
+++ b/servers/rendering/shader_language.cpp
@@ -9383,6 +9383,9 @@ Error ShaderLanguage::complete(const String &p_code, const ShaderCompileInfo &p_
}
}
+ for (const KeyValue<StringName, ShaderNode::Constant> &E : shader->constants) {
+ matches.insert(E.key, ScriptCodeCompletionOption::KIND_CONSTANT);
+ }
for (const KeyValue<StringName, ShaderNode::Varying> &E : shader->varyings) {
matches.insert(E.key, ScriptCodeCompletionOption::KIND_VARIABLE);
}