mirror of
https://github.com/onyx-and-iris/obsws-python.git
synced 2024-11-22 21:00:53 +00:00
b5b69de218
subject module added, supports callbacks. events module added. Provides an event listener and callback trigger. import isorted, code run through black. toml section added to readme. added a couple of examples.
20 lines
365 B
Python
20 lines
365 B
Python
import time
|
|
|
|
import obsstudio_sdk as obs
|
|
|
|
|
|
def main():
|
|
res = cl.GetSceneList()
|
|
scenes = reversed(tuple(d["sceneName"] for d in res["d"]["responseData"]["scenes"]))
|
|
|
|
for sc in scenes:
|
|
print(f"Switching to scene {sc}")
|
|
cl.SetCurrentProgramScene(sc)
|
|
time.sleep(0.5)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
cl = obs.ReqClient()
|
|
|
|
main()
|