When opening a Godot 4.5 project in 4.6 and saving scenes with editable
children of imported scenes (e.g., .blend files), all animation data was
incorrectly being saved to the .tscn file.
This happened because the AnimationLibrary serialization format changed
between 4.5 and 4.6:
- 4.5: 'libraries' as a single Dictionary property
- 4.6: 'libraries/<name>' as separate properties per library
When the scene packer looked for 'libraries/<name>' in old imported
scenes, it didn't find them (only 'libraries' existed), causing all
animation data to appear as 'overridden' and be saved.
This fix adds backwards compatibility in SceneState::get_property_value()
to check for the old Dictionary format when looking up 'libraries/<name>'
properties. It only applies to nodes that inherit from AnimationMixer,
allowing property comparison to work correctly and preventing animation
data from being duplicated into .tscn files.
Fixes#113037
For resources with `resource_local_to_scene` enabled in the sub-scene,
the resource is already set when the sub-scene is instantiated, so does
not need to be set again. Just needs to update the property of the
resource according to the value in the main scene.
This is a follow-up to #65011.
For scenes with **Editable Children** enabled, the main scene will record
more information and resource mapping will be valid for multiple nodes.
The main goal of this PR is to safeguard when a base or instantiated scene changes (nodes renamed, moved or readded),
that the hierarchy is still maintained and the node and its overridden properties can be preserved.
What it does:
* Implements unique node IDs.
* These IDs act as a fallback to names when saving.
* The IDs are **USED AS A FALLBACK**, so they are just an addition. It should not break any current existing scene.
* If a scene renames or moves a node, inherited or instantiated scenes will no longer lose reference to it.
Unlike the previous approach, this one is intended to be a fallback, only used if the node is not found.
This makes it safer to implement and ensure that, at worst case, we fail to find the node, but nothing breaks.
Removed exclusivity between unbind and bind in many places, both on display elements, connection dock and within serialization.
A signal can now be connected with both unbound and bound arguments through the editor
Changes the behaviour of the scene hot-reload system
so that if the scene which needs to be reimported is
owned by another instance, reload that instance instead.
These properties look like they were intended to be internal but they were missing the `PROPERTY_USAGE_INTERNAL` flag.
- `PackedScene::_bundled`
- `PortableCompressedTexture2D::_data`
- `ImporterMesh::_data`