Merge pull request #13284 from dragmz/patch-2
Fix constant node value edit
This commit is contained in:
commit
2f3c4c94da
1 changed files with 2 additions and 2 deletions
|
@ -1064,9 +1064,9 @@ void VisualScriptConstant::set_constant_type(Variant::Type p_type) {
|
|||
return;
|
||||
|
||||
type = p_type;
|
||||
ports_changed_notify();
|
||||
Variant::CallError ce;
|
||||
value = Variant::construct(type, NULL, 0, ce);
|
||||
ports_changed_notify();
|
||||
_change_notify();
|
||||
}
|
||||
|
||||
|
@ -1111,7 +1111,7 @@ void VisualScriptConstant::_bind_methods() {
|
|||
}
|
||||
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT, "type", PROPERTY_HINT_ENUM, argt), "set_constant_type", "get_constant_type");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::NIL, "value", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NIL_IS_VARIANT), "set_constant_value", "get_constant_value");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::NIL, "value", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NIL_IS_VARIANT | PROPERTY_USAGE_DEFAULT), "set_constant_value", "get_constant_value");
|
||||
}
|
||||
|
||||
class VisualScriptNodeInstanceConstant : public VisualScriptNodeInstance {
|
||||
|
|
Loading…
Reference in a new issue