Skip to content

Commit

Permalink
Corrent generate_bindings.py for godot_variant param with Null defa…
Browse files Browse the repository at this point in the history
…ult (fix #139)
  • Loading branch information
touilleMan committed Jan 30, 2020
1 parent 3623c49 commit b3f4b9c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tools/generate_bindings.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,10 @@ def _cook_name(name):
def _cook_default_arg(type, value):
# Mostly ad-hoc stuff given default values format in api.json is broken
if type in ("godot_bool", "godot_int", "godot_real", "godot_variant"):
return value
if value == "Null":
return "None"
else:
return value
elif type == "godot_string":
return f'"{value}"'
elif type == "godot_object" and value in ("[Object:null]", "Null"):
Expand Down

0 comments on commit b3f4b9c

Please sign in to comment.