-
-
Notifications
You must be signed in to change notification settings - Fork 22k
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
Fix MissingResource
properties being stripped on save
#86600
Conversation
3c29723
to
fa2103f
Compare
fa2103f
to
6fa3ea9
Compare
@reduz Preserving the missing resources when saving is a good thing, but I would like a technical second look. |
Can you do a rebase? I'll try to review. |
6fa3ea9
to
87cce79
Compare
Thanks, I've rebased on current master |
87cce79
to
2e7d923
Compare
@fire I've rebased again, can you take a look? |
2e7d923
to
5ab8636
Compare
5ab8636
to
e338945
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's ok, but it's also touching core so I'm a bit wary.
Will try it on my projects.
d92345e
to
b130075
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style looks good
23f5f4a
to
95d2909
Compare
LGTM |
The bug and this PR are fixing an issue "stripped upon save". Why then is it modifying load-side functions ResourceLoader and scenestate::_parse_node? i am concerned that this implies some form of compat breakage (resources changing next time I update the engine) |
Please see here for a full explanation, but basically: The reason for ResourceLoader being modified is that the pre-existing missing resource assignment was buggy; thus, the missing resources were not actually being loaded as MissingResources, and as such were not being saved when the scene/resource was re-saved. The reason for scenestate::_parse_node being modified:
Basically, when saving a scene, nodes that had properties set to a missing resource were skipped because they weren't previously loaded into the packed scene. This shouldn't mess with scene instancing. During actual instancing, when attempting to assign a MissingResource to a node property, it'll just silently fail. |
Thanks! |
fixes #86599
See #60597 (review)
There were a number of bugs in the MissingResource implementation that prevented it from actually preserving the missing resources when saving; I have corrected these.