summaryrefslogtreecommitdiff
path: root/scene/resources
diff options
context:
space:
mode:
authorPedro J. Estébanez <pedrojrulez@gmail.com>2021-12-11 14:03:48 +0100
committerPedro J. Estébanez <pedrojrulez@gmail.com>2021-12-11 14:03:48 +0100
commit18663aa305ef1ed5c87efd74425146112322b91f (patch)
treebfbe62692d1b878aaf1364c69743ddb0b18e4aa6 /scene/resources
parent092a2861277e7df87aec10516d713d0bf4adba79 (diff)
Stop asuming a default value of NIL means there's no default
Diffstat (limited to 'scene/resources')
-rw-r--r--scene/resources/packed_scene.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/scene/resources/packed_scene.cpp b/scene/resources/packed_scene.cpp
index e6b499d4f1..b2a339b850 100644
--- a/scene/resources/packed_scene.cpp
+++ b/scene/resources/packed_scene.cpp
@@ -501,8 +501,9 @@ Error SceneState::_parse_node(Node *p_owner, Node *p_node, int p_parent_idx, Map
Variant value = forced_value.get_type() == Variant::NIL ? p_node->get(name) : forced_value;
if (!pinned_props.has(name) && forced_value.get_type() == Variant::NIL) {
- Variant default_value = PropertyUtils::get_property_default_value(p_node, name, &states_stack, true);
- if (!PropertyUtils::is_property_value_different(value, default_value)) {
+ bool is_valid_default = false;
+ Variant default_value = PropertyUtils::get_property_default_value(p_node, name, &is_valid_default, &states_stack, true);
+ if (is_valid_default && !PropertyUtils::is_property_value_different(value, default_value)) {
continue;
}
}