mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
StringName Dictionary keys
also added 'is_string()' method to Variant and refactored many String type comparisons to use it instead
This commit is contained in:
parent
40b378e9e2
commit
154049ce17
34 changed files with 65 additions and 82 deletions
|
@ -2201,7 +2201,7 @@ void VisualShaderEditor::_update_options_menu() {
|
|||
if (input.is_valid()) {
|
||||
input->set_shader_mode(visual_shader->get_mode());
|
||||
input->set_shader_type(visual_shader->get_shader_type());
|
||||
if (!add_options[i].ops.is_empty() && add_options[i].ops[0].get_type() == Variant::STRING) {
|
||||
if (!add_options[i].ops.is_empty() && add_options[i].ops[0].is_string()) {
|
||||
input->set_input_name((String)add_options[i].ops[0]);
|
||||
}
|
||||
}
|
||||
|
@ -3281,7 +3281,7 @@ void VisualShaderEditor::_setup_node(VisualShaderNode *p_node, const Vector<Vari
|
|||
VisualShaderNodeInput *input = Object::cast_to<VisualShaderNodeInput>(p_node);
|
||||
|
||||
if (input) {
|
||||
ERR_FAIL_COND(p_ops[0].get_type() != Variant::STRING);
|
||||
ERR_FAIL_COND(!p_ops[0].is_string());
|
||||
input->set_input_name((String)p_ops[0]);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue