Skip to content

Commit

Permalink
Add default argument processing for NodePath
Browse files Browse the repository at this point in the history
(cherry picked from commit 37e7a6d)
  • Loading branch information
AThousandShips authored and dsnopek committed Jun 14, 2024
1 parent 3ef36cb commit 10f13a4
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 @@ -2431,6 +2431,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 @@ -2444,6 +2445,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 10f13a4

Please sign in to comment.