def StopCinematicMode(pAction): # Change out of cinematic mode.. pTopWindow = App.TopWindow_GetTopWindow() pFocus = pTopWindow.GetFocus() pCinematic = App.CinematicWindow_Cast(pTopWindow.FindMainWindow(App.MWT_CINEMATIC)) if pCinematic: # Only toggle out if we're currently in Cinematic mode. if pFocus and (pFocus.GetObjID() == pCinematic.GetObjID()): # Toggle out.. pTopWindow.ToggleCinematicWindow() # Set it interactive again. pCinematic.SetInteractive(1) return 0
def StartCinematicMode(pAction, bInteractive = 0): # Change into cinematic mode.. pTopWindow = App.TopWindow_GetTopWindow() pFocus = pTopWindow.GetFocus() pCinematic = App.CinematicWindow_Cast(pTopWindow.FindMainWindow(App.MWT_CINEMATIC)) if pCinematic: # Only switch into Cinematic if we're not already in Cinematic.. if (not pFocus) or (pFocus.GetObjID() != pCinematic.GetObjID()): # Toggle into cinematic. pTopWindow.ToggleCinematicWindow() # Specify whether it's interactive or not. pCinematic.SetInteractive(bInteractive) return 0