mirror of
				https://github.com/onyx-and-iris/obsws-python.git
				synced 2025-11-04 06:41:47 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			19 lines
		
	
	
		
			399 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
		
			399 B
		
	
	
	
		
			Python
		
	
	
	
	
	
import time
 | 
						|
 | 
						|
import obsws_python as obs
 | 
						|
 | 
						|
 | 
						|
def main():
 | 
						|
    with obs.ReqClient() as client:
 | 
						|
        resp = client.get_scene_list()
 | 
						|
        scenes = [di.get("sceneName") for di in reversed(resp.scenes)]
 | 
						|
 | 
						|
        for scene in scenes:
 | 
						|
            print(f"Switching to scene {scene}")
 | 
						|
            client.set_current_program_scene(scene)
 | 
						|
            time.sleep(0.5)
 | 
						|
 | 
						|
 | 
						|
if __name__ == "__main__":
 | 
						|
    main()
 |