def GetTransition(ws): Result = {} try: Transition = ws.call(requests.GetCurrentTransition()) except: print("Couldn't get current transition") else: try: Result["Transition"] = Transition.getName() except: pass try: Result["TransitionDuration"] = Transition.getDuration() except: pass return Result
def GetCurrentTransition(self): try: return self.ws.call( requests.GetCurrentTransition()).__dict__["datain"]["name"] except Exception as e: print(e)
def do_transition(self): res = self.ws.call(requests.GetCurrentTransition()) self.ws.call( requests.TransitionToProgram(with_transition_name=res.getName()))
check_toggle() if toggle_mode is True: #print "Toggle mode is ON" if toggle == 1: #print "Script is ON, STOP NOW" set_toggle(0) exit() else: if toggle == 1: #print "Script is ON, STOP NOW" exit() #Get the default Transition current_transition_name = ws.call( requests.GetCurrentTransition()).getName() if current_transition_name != "Cut": current_transition_duration = ws.call( requests.GetCurrentTransition()).getDuration() #If transition_override is true we change the transition style if transition_override is True and transition_random is False and transition_sequence is False: ws.call(requests.SetCurrentTransition(transition_list[0])) # Type if transition_list[0] != "Cut": ws.call( requests.SetTransitionDuration(transition_duration)) #Duration #First launch, write 1 on toggle file set_toggle(1) scenes_numbers = len(scenes_list)