Skip to content
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

Add default argument processing for NodePath #1488

Merged
merged 1 commit into from
Jun 14, 2024

Conversation

AThousandShips
Copy link
Member

@AThousandShips AThousandShips commented Jun 13, 2024

No bindings contain default arguments for NodePath currently but they would break if they were added

@AThousandShips AThousandShips added enhancement This is an enhancement on the current functionality topic:buildsystem Related to the buildsystem or CI setup labels Jun 13, 2024
@AThousandShips AThousandShips added this to the 4.x milestone Jun 13, 2024
@AThousandShips AThousandShips requested a review from a team as a code owner June 13, 2024 15:21
@AThousandShips
Copy link
Member Author

AThousandShips commented Jun 13, 2024

Default arguments can currently be bound which cannot be encoded properly, at least without reworking some of the bind code

Will look into checks in the engine to ensure this is handled properly, default arrays and default Packed*Arrays won't work currently which either requires special handling to create the values in the bindings, or blocking them in the engine itself

Edit: will look at adding to the ClassDB tests as an initial safeguard, checking default values so they won't allow non-empty default Array, Dictionary, or Packed*Arrays, to make sure we won't get any unrepresentable values at least until we make it work over here if we want that

Copy link
Collaborator

@dsnopek dsnopek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! This looks good to me :-)

@AThousandShips AThousandShips modified the milestones: 4.x, 4.3 Jun 13, 2024
@dsnopek dsnopek merged commit ee9acbc into godotengine:master Jun 14, 2024
12 checks passed
@AThousandShips AThousandShips deleted the default_node_path branch June 14, 2024 13:15
@dsnopek
Copy link
Collaborator

dsnopek commented Jun 14, 2024

Cherry-picked for 4.1 in PR #1491

@dsnopek
Copy link
Collaborator

dsnopek commented Jun 14, 2024

Cherry-picked for 4.2 in PR #1492

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This is an enhancement on the current functionality topic:buildsystem Related to the buildsystem or CI setup
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants