-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Instanced scenes share their metadata if the saved PackedScene contains saved metadata #29189
Comments
Nevermind, read the following post. |
Okay, my bad, I've found the issue. It doesn't happen in 3.0.x or 3.1.x It only happens on master. Master now saves the following metadata automatically in each PackedScene.:
And that's what's causing the problem in the first place. I manually added metadata to one of the instanced *.tscn files and I could replicate the issue in 3.0+ but not in 2.1.5 I made a quick fix here Lines 437 to 443 in 0d8f1ba
metadata = p_value; to metadata = p_value.duplicate(true); (deep duplicate) which fixed the issue in master but because it doesn't happen in 2.1.5 I think that's not the correct fix.
|
I noticed an issue tangential to this on commit b030834, not sure if it's related. Metadata such as edit locking or Position2D gizmo extents doesn't get saved when you change it on an instanced scene in the scene tree dock. It will be lost when you reload the scene. |
Might be related/duplicate of #20648 |
Fixed by #32416. |
Godot version:
Godot 3.0.6, Godot 3.1.1 and latest Godot master 0d8f1ba
OS/device including version:
Windows 10
Issue description:
If the Control's children are instances of the same scene the children of the same scene will share the same metadata.Instanced scenes share their metadata if the saved
PackedScene
contains saved metadata in the scene's root node.This is problematic because master now saves metadata for each control and some controls like the
TabContainer
and itsTabContainer.set_tab_*()
methods use the child's metadata to change some internal values.As far as I can tell this doesn't happen with Node, Node2D or Spatial instances.Steps to reproduce:
Open the attached MRP and run the Main* scenes. Only
MainControl
will show:The expected result (and the result you will get with all others) is:
Notice that
InstancedControl.tscn
andAnotherControlInstanced.tscn
contains saved metadata while the other *.tscn don't. If you add metadata manually the problem will appear in those instances.Minimal reproduction project:
test_meta_instances.zip
The text was updated successfully, but these errors were encountered: