We now cache the Node*<>TreeItem* mapping in the SceneTreeEditor. This
allows us to make targeted updates to the Tree used to display the scene
tree in the editor.
Previously on almost all changes to the scene tree the editor would
rebuild the entire widget, causing a large number of deallocations an
allocations. We now carefully manipulate the Tree widget in-situ saving
a large number of these allocations.
In order to know what Nodes need to be updated we add a
editor_state_changed signal to Node, this is a TOOLS_ENABLED,
editor-only signal fired when changes to Node happen that are relevant
to editor state.
We also now make sure that when nodes are moved/renamed we don't check
expensive properties that cannot contain NodePaths. This saves a lot of
time when SceneTreeDock renames a node in a scene with a lot of
MeshInstances. This makes renaming nodes go from ~27 seconds to ~2
seconds on large scenes.
SceneTreeEditor instances will now also not do all of the potentially
expensive update work if they are invisible. This behavior is turned off
by default so it won't affect existing users. This change allows the
editor to only update SceneTreeEditors that actually in view. In
practice this means that for most changes instead of updating 6
SceneTreeEditors we only update 1 instantly, and the others only when
they become visible.
There is definitely more that could be done, but this is already a
massive improvement. In complex scenes we see an improvement of 10x,
things that used to take ~30 seconds now only take 2.
This fixes#83460
I want to thank KoBeWi, TokisanGames, a-johnston, aniel080400 for
their tireless testing. And AeioMuch for their testing and providing a
fix for the hover issue.
Enforce that custom nodes and resources created via the "Create New Node" dialog, should permanently retain their original type (script). This means:
- Type continuity: It should be impossible for the user to (accidentally) clear the original script of a custom node that was created via the "Create New Node" dialog.
- Extensibility: The user should be able to extend custom types as usual (create a script that inherits the original type and replace the original script of that node with his own). However, if he then clears his extension-script from that node later on, the custom type should revert to its original script instead of becoming a non-scripted type.
- Updated list view with thumbnails, and separate file name.
- Added a grid view which has larger icons.
- Added toggle to filter out files from addons.
- Store history for each opened resource type.
New Editor settings for Quick Open:
- Startup display mode (grid or list):
- Determined by the requested resource type.
- Whatever was last used.
- Toggle to filter out files from addons (for persistence).
Notes
- The dialog is now created once in EditorNode, and globally available for other components.
- A fixed number of result scenes are instantiated, and reused based on query.
- Drop support for multiselect.
This broke when the `node_selected` connection was removed in #91435.
Here it's returned, but the emit is removed from `_node_removed`. That
preserves the earlier fix while allowing nodes to be reselected.