Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
marcoponne opened this issue Nov 27, 2021 · 0 comments

Comments

@marcoponne
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant