Update NodePaths only in built-in resources

This commit is contained in:
kobewi 2023-11-29 12:31:48 +01:00
parent f040a351c2
commit 77879d4288

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: {
}