diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-02-25 15:27:09 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-25 15:27:09 +0100 |
commit | 2f237d181b6fd769b52bded49cafc9bc5eb9f087 (patch) | |
tree | 7a675fe9331fd010c5e8486df42ac6fad188179c /scene/resources/visual_shader.cpp | |
parent | b8f0da7bed976f889a0316981dc419e179f63df8 (diff) | |
parent | 33b5c571995cce60a21784ac33fcf958640ed1e2 (diff) |
Merge pull request #36515 from reduz/packed-array-64-bits
Variant: Added 64-bit packed arrays, renamed Variant::REAL to FLOAT.
Diffstat (limited to 'scene/resources/visual_shader.cpp')
-rw-r--r-- | scene/resources/visual_shader.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/resources/visual_shader.cpp b/scene/resources/visual_shader.cpp index edd65f60e2..0989df479d 100644 --- a/scene/resources/visual_shader.cpp +++ b/scene/resources/visual_shader.cpp @@ -1049,7 +1049,7 @@ void VisualShader::_get_property_list(List<PropertyInfo> *p_list) const { p_list->push_back(PropertyInfo(Variant::STRING, prop_name + "/expression", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR)); } } - p_list->push_back(PropertyInfo(Variant::PACKED_INT_ARRAY, "nodes/" + String(type_string[i]) + "/connections", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR)); + p_list->push_back(PropertyInfo(Variant::PACKED_INT32_ARRAY, "nodes/" + String(type_string[i]) + "/connections", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR)); } } @@ -1126,7 +1126,7 @@ Error VisualShader::_write_node(Type type, StringBuilder &global_code, StringBui } else { Variant defval = vsnode->get_input_port_default_value(i); - if (defval.get_type() == Variant::REAL || defval.get_type() == Variant::INT) { + if (defval.get_type() == Variant::FLOAT || defval.get_type() == Variant::INT) { float val = defval; inputs[i] = "n_in" + itos(node) + "p" + itos(i); code += "\tfloat " + inputs[i] + " = " + vformat("%.5f", val) + ";\n"; |