From 10f13a4cab08f765c2a853dc164b6047af0d0103 Mon Sep 17 00:00:00 2001 From: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> Date: Thu, 13 Jun 2024 17:17:33 +0200 Subject: [PATCH] Add default argument processing for `NodePath` (cherry picked from commit 37e7a6da0536d496e2e3773911fdf300a2c5522d) --- binding_generator.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/binding_generator.py b/binding_generator.py index cc5e6f33f8..950849229c 100644 --- a/binding_generator.py +++ b/binding_generator.py @@ -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