Merge pull request #590 from Faless/generator/fix_byte_array_default

Fix binding when default parameter is a PoolByteArray.
pull/616/head
Fabio Alessandrelli 2021-09-07 20:08:56 +02:00 committed by GitHub
commit 466f2cdebf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -294,7 +294,7 @@ def generate_class_header(used_classes, c, use_template_get_node):
return default_value.lower() return default_value.lower()
if _type == "Array": if _type == "Array":
return "Array()" return "Array()"
if _type in ["PoolVector2Array", "PoolStringArray", "PoolVector3Array", "PoolColorArray", "PoolIntArray", "PoolRealArray"]: if _type in ["PoolVector2Array", "PoolStringArray", "PoolVector3Array", "PoolColorArray", "PoolIntArray", "PoolRealArray", "PoolByteArray"]:
return _type + "()" return _type + "()"
if _type == "Vector2": if _type == "Vector2":
return "Vector2" + default_value return "Vector2" + default_value