TypeError: 'SwigPyObject' object is not callable on obs.obs_frontend_get_current_scene()
marcoponne opened this issue · comments
I was playing a bit with the (Python) scripting abilities, but ran into issues with calling obs.obs_frontend_set_current_scene().
It returns a TypeError: 'SwigPyObject' object is not callable.
def cycle():
scenes = obs.obs_frontend_get_scenes()
current_scene = obs.obs_frontend_get_current_scene()
scenes.remove(current_scene)
obs.obs_frontend_set_current_scene(random.choice(scenes))
[autoswitcher.py] File "C:/Users/xxx/OneDrive/Documenten\autoswitcher.py", line 70, in cycle
[autoswitcher.py] obs.obs_frontend_set_current_scene(random.choice(scenes))
[autoswitcher.py] TypeError: 'SwigPyObject' object is not callable
OBS Version 27.1.3 with Python 3.6.8 (64-bit) on Windows 11.