diff --git a/src/script/node_pin.cpp b/src/script/node_pin.cpp index 1090875f..8ba438f8 100644 --- a/src/script/node_pin.cpp +++ b/src/script/node_pin.cpp @@ -54,6 +54,11 @@ Ref OScriptNodePin::create(OScriptNode* p_owning_node, const Pro pin->_owning_node = p_owning_node; pin->_property = p_property; + #if GODOT_VERSION < 0x040300 + if (pin->_property.usage == 7) + pin->_property.usage = PROPERTY_USAGE_DEFAULT; + #endif + if (PropertyUtils::is_enum(p_property)) { pin->_flags.set_flag(ENUM); @@ -135,6 +140,11 @@ bool OScriptNodePin::_load(const Dictionary& p_data) if (p_data.has("usage")) _property.usage = p_data["usage"]; + #if GODOT_VERSION < 0x040300 + if (_property.usage == 7) + _property.usage = PROPERTY_USAGE_DEFAULT; + #endif + return true; } @@ -177,6 +187,11 @@ Dictionary OScriptNodePin::_save() if (!_property.hint_string.is_empty()) data["hint_string"] = _property.hint_string; + #if GODOT_VERSION < 0x040300 + if (_property.usage == 7) + _property.usage = PROPERTY_USAGE_DEFAULT; + #endif + if (_property.usage != PROPERTY_USAGE_DEFAULT) data["usage"] = _property.usage;