mirror of
https://github.com/godotengine/godot-cpp.git
synced 2026-01-06 06:10:06 +03:00
Add default argument processing for NodePath
(cherry picked from commit 37e7a6da05)
This commit is contained in:
committed by
David Snopek
parent
65058828a6
commit
a648650c5d
@@ -2310,6 +2310,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.
|
||||||
@@ -2323,6 +2324,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
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user