Merge pull request #1488 from AThousandShips/default_node_path
Add default argument processing for `NodePath`pull/1490/head
commit
ee9acbcf10
|
@ -2567,6 +2567,7 @@ def correct_default_value(value, type_name):
|
||||||
"null": "nullptr",
|
"null": "nullptr",
|
||||||
'""': "String()",
|
'""': "String()",
|
||||||
'&""': "StringName()",
|
'&""': "StringName()",
|
||||||
|
'^""': "NodePath()",
|
||||||
"[]": "Array()",
|
"[]": "Array()",
|
||||||
"{}": "Dictionary()",
|
"{}": "Dictionary()",
|
||||||
"Transform2D(1, 0, 0, 1, 0, 0)": "Transform2D()", # Default transform.
|
"Transform2D(1, 0, 0, 1, 0, 0)": "Transform2D()", # Default transform.
|
||||||
|
@ -2580,6 +2581,8 @@ def correct_default_value(value, type_name):
|
||||||
return f"{{}}"
|
return f"{{}}"
|
||||||
if value.startswith("&"):
|
if value.startswith("&"):
|
||||||
return value[1::]
|
return value[1::]
|
||||||
|
if value.startswith("^"):
|
||||||
|
return value[1::]
|
||||||
return value
|
return value
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue