Skip to content

Commit

Permalink
Add default argument processing for NodePath
Browse files Browse the repository at this point in the history
  • Loading branch information
AThousandShips committed Jun 13, 2024
1 parent 6c40641 commit 37e7a6d
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 @@ -2562,6 +2562,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 @@ -2575,6 +2576,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 37e7a6d

Please sign in to comment.