Fix duplicating node references of custom node type properties#112076
Merged
Repiteo merged 1 commit intogodotengine:masterfrom Nov 11, 2025
Merged
Fix duplicating node references of custom node type properties#112076Repiteo merged 1 commit intogodotengine:masterfrom
Repiteo merged 1 commit intogodotengine:masterfrom
Conversation
Script assignment must be complete for the subtree in order to correctly assign into properties set to a script type.
1ab618d to
b9cc82d
Compare
RandomShaper
approved these changes
Nov 6, 2025
Contributor
|
Thanks! |
Member
|
Cherry-picked for 4.5.2. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #102793
Fixes #110665
Issue was that script property of child nodes weren't assigned by the time a parent node's node properties were being processed. So
_duplicate_properties()would grab the correct node, butset()would fail from type checking since the node didn't have a script on it.#91329 caused the issue since it removed the property copy pass that would successfully do assignment since the first pass copied the scripts.
This fix ensures at least the script property is copied before trying to assign node properties. Couldn't only change the traversal order of
_duplicate_properties()since that would cause nodes with references to ancestors to fail assignment instead.