mirror of
https://github.com/Relintai/gdnative_python.git
synced 2024-11-12 10:25:08 +01:00
Added missing StringName conversions.
This commit is contained in:
parent
d0d72b9ae9
commit
f262501f40
@ -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
|
||||
|
@ -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...
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user