Skip to content

Commit

Permalink
Merge pull request #85502 from KoBeWi/external_is_eternal_and_does_no…
Browse files Browse the repository at this point in the history
…t_abide_to_changes

Update NodePaths only in built-in resources
  • Loading branch information
akien-mga committed Mar 11, 2024
2 parents f040a35 + 77879d4 commit 397fd1b
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions editor/scene_tree_dock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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);

Expand All @@ -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: {
}
Expand Down

0 comments on commit 397fd1b

Please sign in to comment.