X Tutup
Skip to content

Fix duplicating node references of custom node type properties#112076

Merged
Repiteo merged 1 commit intogodotengine:masterfrom
kevinlam508:custom-node-reference-duplication
Nov 11, 2025
Merged

Fix duplicating node references of custom node type properties#112076
Repiteo merged 1 commit intogodotengine:masterfrom
kevinlam508:custom-node-reference-duplication

Conversation

@kevinlam508
Copy link
Contributor

@kevinlam508 kevinlam508 commented Oct 27, 2025

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, but set() 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.

@kevinlam508 kevinlam508 requested a review from a team as a code owner October 27, 2025 06:45
@AThousandShips AThousandShips added this to the 4.6 milestone Oct 27, 2025
Script assignment must be complete for the subtree in order to correctly assign into properties set to a script type.
@kevinlam508 kevinlam508 force-pushed the custom-node-reference-duplication branch from 1ab618d to b9cc82d Compare October 27, 2025 21:00
@RandomShaper RandomShaper added the cherrypick:4.5 Considered for cherry-picking into a future 4.5.x release label Nov 6, 2025
@Repiteo Repiteo merged commit 72925d7 into godotengine:master Nov 11, 2025
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Nov 11, 2025

Thanks!

@akien-mga
Copy link
Member

Cherry-picked for 4.5.2.

@akien-mga akien-mga removed the cherrypick:4.5 Considered for cherry-picking into a future 4.5.x release label Jan 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

6 participants

X Tutup