Skip to content

Commit

Permalink
Merge pull request #1488 from AThousandShips/default_node_path
Browse files Browse the repository at this point in the history
Add default argument processing for `NodePath`
  • Loading branch information
dsnopek authored Jun 14, 2024
2 parents 64f1bc8 + 37e7a6d commit ee9acbc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions binding_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -2567,6 +2567,7 @@ def correct_default_value(value, type_name):
"null": "nullptr",
'""': "String()",
'&""': "StringName()",
'^""': "NodePath()",
"[]": "Array()",
"{}": "Dictionary()",
"Transform2D(1, 0, 0, 1, 0, 0)": "Transform2D()", # Default transform.
Expand All @@ -2580,6 +2581,8 @@ def correct_default_value(value, type_name):
return f"{{}}"
if value.startswith("&"):
return value[1::]
if value.startswith("^"):
return value[1::]
return value


Expand Down

0 comments on commit ee9acbc

Please sign in to comment.