DarkMorford
New Member
I'm trying to write a scene switcher/controller script in Python that would integrate with my overlay control panel. Unfortunately, I'm stuck right out of the gate because I can't figure out the syntax for calling
And the error I get is
EDIT: There's a bug on Mantis that doesn't cover this exact issue, but does touch on working with double-pointer functions in general. See #1244.
obs_enum_transition_types()
or any of its function family, specifically passing the second (output) argument. Here's some sample code to illustrate:
Code:
import obspython as obs
from ctypes import byref, c_char_p
def script_load(settings):
typename = c_char_p()
valid = obs.obs_enum_transition_types(0, byref(typename))
if (valid):
print(typename)
TypeError: in method 'obs_enum_transition_types', argument 2 of type 'char const **'
. From my limited knowledge of ctypes, I'm pretty sure the combination of c_char_p
and byref()
is getting me the double-pointer, but I can't figure out how to get the const
qualifier in there. Has anyone been successful calling these functions from Python, or are the bindings just busted?EDIT: There's a bug on Mantis that doesn't cover this exact issue, but does touch on working with double-pointer functions in general. See #1244.