diff options
author | Yuri Roubinsky <chaosus89@gmail.com> | 2022-01-13 19:49:43 +0300 |
---|---|---|
committer | Yuri Roubinsky <chaosus89@gmail.com> | 2022-01-13 19:52:06 +0300 |
commit | 4201af664908dbbca8962b7900bc94e5ac6b62b9 (patch) | |
tree | 10294c82b039f52d0418b008089028f729cc9433 /servers/rendering | |
parent | 2b4290609ad6a87eb17aec0d75d8611f7d05eb25 (diff) |
Fix completion for global constants in shaders
Diffstat (limited to 'servers/rendering')
-rw-r--r-- | servers/rendering/shader_language.cpp | 3 |
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); } |