Added missing StringName conversions.

This commit is contained in:
Relintai 2023-06-03 01:45:33 +02:00
parent d0d72b9ae9
commit f262501f40
2 changed files with 5 additions and 2 deletions

View File

@ -69,6 +69,9 @@ cdef GDString __gdstr_{{ arg.name }} = ensure_is_gdstring({{ arg.name }})
{% elif arg.type.c_type == "pandemonium_node_path" %}
cdef NodePath __nodepath_{{ arg.name }} = ensure_is_nodepath({{ arg.name }})
{{ argsval }}[{{ i }}] = <void*>(&__nodepath_{{ arg.name }}._gd_data)
{% elif arg.type.c_type == "pandemonium_string_name" %}
cdef StringName __string_name_{{ arg.name }} = ensure_is_string_name({{ arg.name }})
{{ argsval }}[{{ i }}] = <void*>(&__string_name_{{ arg.name }}._gd_data)
{% elif arg.type.is_object %}
{%- if arg.has_default_value and arg.default_value == "None" %}
{{ argsval }}[{{ i }}] = <void*>{{ arg.name }}._gd_ptr if {{ arg.name }} is not None else NULL

View File

@ -14,7 +14,7 @@ from pandemonium._hazmat.gdnative_api_struct cimport (
pandemonium_variant,
pandemonium_variant_type,
)
from pandemonium.builtins cimport GDString, NodePath
from pandemonium.builtins cimport GDString, NodePath, StringName
# Strings are now char32_t
@ -81,7 +81,7 @@ cdef pandemonium_variant_type pytype_to_pandemonium_type(object pytype)
cdef GDString ensure_is_gdstring(object gdstring_or_pystr)
cdef NodePath ensure_is_nodepath(object nodepath_or_pystr)
cdef StringName ensure_is_string_name(object string_name_or_pystr)
# TODO: finish this...