Merge pull request #1488 from AThousandShips/default_node_path

Add default argument processing for `NodePath`
pull/1490/head
David Snopek 2024-06-14 08:15:04 -05:00 committed by GitHub
commit ee9acbcf10
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 0 deletions

View File

@ -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.
@ -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