Merge pull request #85502 from KoBeWi/external_is_eternal_and_does_not_abide_to_changes

Update NodePaths only in built-in resources
This commit is contained in:
Rémi Verschelde 2024-03-11 23:48:00 +01:00
commit 397fd1bece
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -1812,8 +1812,6 @@ bool SceneTreeDock::_check_node_path_recursive(Node *p_root_node, Variant &r_var
}
} break;
// FIXME: This approach causes a significant performance regression, see GH-84910.
#if 0
case Variant::OBJECT: {
Resource *resource = Object::cast_to<Resource>(r_variant);
if (!resource) {
@ -1825,6 +1823,11 @@ bool SceneTreeDock::_check_node_path_recursive(Node *p_root_node, Variant &r_var
break;
}
if (!resource->is_built_in()) {
// For performance reasons, assume that scene paths are no concern for external resources.
break;
}
List<PropertyInfo> properties;
resource->get_property_list(&properties);
@ -1841,9 +1844,7 @@ bool SceneTreeDock::_check_node_path_recursive(Node *p_root_node, Variant &r_var
undo_redo->add_undo_property(resource, propertyname, old_variant);
}
}
break;
};
#endif
} break;
default: {
}