Merge pull request #56757 from Chaosus/shader_fix_constant_completion

This commit is contained in:
Yuri Roubinsky 2022-01-13 20:37:27 +03:00 committed by GitHub
commit d13c3c9296
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);
}