Skip to content

TypeError: 'SwigPyObject' object is not callable on obs.obs_frontend_get_current_scene() #4

@marcoponne

Description

@marcoponne

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions