mirror of
https://github.com/onyx-and-iris/obsws-python.git
synced 2024-11-23 05:10:53 +00:00
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()
|