Add default argument processing for `NodePath`
(cherry picked from commit 37e7a6da05
)
pull/1492/head
parent
a6e5caacf8
commit
c5204a2e84
|
@ -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.
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue