Use POINTER(c_char) for binary data with pyassimp
"For a general character pointer that may also point to binary data, POINTER(c_char) must be used." c_char_p is for a zero-terminated string. Reference: https://docs.python.org/3/library/ctypes.html#ctypes.c_char_p Applying this change to the 4.1.4 released python module fixes #2339 for me in Ubuntu.pull/3877/head
parent
cd0fd30821
commit
f17d58cadd
|
@ -1,6 +1,6 @@
|
||||||
#-*- coding: utf-8 -*-
|
#-*- coding: utf-8 -*-
|
||||||
|
|
||||||
from ctypes import POINTER, c_void_p, c_uint, c_char, c_float, Structure, c_char_p, c_double, c_ubyte, c_size_t, c_uint32
|
from ctypes import POINTER, c_void_p, c_uint, c_char, c_float, Structure, c_double, c_ubyte, c_size_t, c_uint32
|
||||||
|
|
||||||
|
|
||||||
class Vector2D(Structure):
|
class Vector2D(Structure):
|
||||||
|
@ -1121,7 +1121,7 @@ class Scene(Structure):
|
||||||
("mMetadata", POINTER(Metadata)),
|
("mMetadata", POINTER(Metadata)),
|
||||||
|
|
||||||
# Internal data, do not touch
|
# Internal data, do not touch
|
||||||
("mPrivate", c_char_p),
|
("mPrivate", POINTER(c_char)),
|
||||||
]
|
]
|
||||||
|
|
||||||
assimp_structs_as_tuple = (Matrix4x4,
|
assimp_structs_as_tuple = (Matrix4x4,
|
||||||
|
|
Loading…
Reference in New Issue