Fix duplicating node references of custom node type properties #112076
+23
−7
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
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.