def slide_trim_mode_init(x, y): """ User selects two roll mode """ track = tlinewidgets.get_track(y) if track == None: return False if track_lock_check_and_user_info(track, tworoll_trim_mode_init, "two roll trim mode"): set_default_edit_mode() return False stop_looping() editorstate.edit_mode = editorstate.SLIDE_TRIM movemodes.clear_selected_clips( ) # Entering trim edit mode clears selection updater.set_trim_mode_gui() press_frame = tlinewidgets.get_frame(x) trimmodes.set_exit_mode_func = set_default_edit_mode trimmodes.set_no_edit_mode_func = slide_trim_no_edit_init success = trimmodes.set_slide_mode(track, press_frame) return success
def slide_trim_no_edit_init(): stop_looping() # Stops looping editorstate.edit_mode = editorstate.SLIDE_TRIM_NO_EDIT gui.editor_window.set_cursor_to_mode() tlinewidgets.set_edit_mode(None, None) # No overlays are drawn in this edit mode movemodes.clear_selected_clips() # Entering trim edit mode clears selection updater.set_trim_mode_gui()
def oneroll_trim_mode_init(x, y): """ User enters ONE_ROLL_TRIM mode from ONE_ROLL_TRIM_NO_EDIT """ track = tlinewidgets.get_track(y) if track == None: return False if track_lock_check_and_user_info(track, oneroll_trim_mode_init, "one roll trim mode"): set_default_edit_mode() return False stop_looping() editorstate.edit_mode = editorstate.ONE_ROLL_TRIM movemodes.clear_selected_clips( ) # Entering trim edit mode clears selection updater.set_trim_mode_gui() # init mode press_frame = tlinewidgets.get_frame(x) trimmodes.set_exit_mode_func = set_default_edit_mode trimmodes.set_no_edit_mode_func = oneroll_trim_no_edit_init success = trimmodes.set_oneroll_mode(track, press_frame) return success
def multitrim_mode_pressed(): stop_looping() editorstate.edit_mode = editorstate.MULTI_TRIM tlinewidgets.set_edit_mode(None, None) # No overlays are drawn in this edit mode movemodes.clear_selected_clips( ) # Entering trim edit mode clears selection updater.set_trim_mode_gui()
def _edit_completed(): """ Called after edit completed in trimmodes.py """ trimmodes.edit_complete_callback = None # Get back to MULTI_TRIM mode after doing the edit editorstate.edit_mode = editorstate.MULTI_TRIM tlinewidgets.set_edit_mode(None, None) # No overlays are drawn in this edit mode updater.set_trim_mode_gui()
def oneroll_trim_no_edit_init(): """ This mode is entered and this method is called when: - user first selects trim tool - user does cut(X) action while in trim mode - user clicks empty and preference is to keep using trim tool (to not exit to INSERT_MOVE) """ stop_looping() editorstate.edit_mode = editorstate.ONE_ROLL_TRIM_NO_EDIT gui.editor_window.set_cursor_to_mode() tlinewidgets.set_edit_mode(None, None) # No overlays are drawn in this edit mode movemodes.clear_selected_clips() # Entering trim edit mode clears selection updater.set_trim_mode_gui()
def slide_trim_mode_init(x, y): """ User selects two roll mode """ track = tlinewidgets.get_track(y) if track == None: return False stop_looping() editorstate.edit_mode = editorstate.SLIDE_TRIM movemodes.clear_selected_clips() # Entering trim edit mode clears selection updater.set_trim_mode_gui() press_frame = tlinewidgets.get_frame(x) trimmodes.set_exit_mode_func = set_default_edit_mode trimmodes.set_no_edit_mode_func = slide_trim_no_edit_init success = trimmodes.set_slide_mode(track, press_frame) return success
def tworoll_trim_mode_init(x, y): """ User selects two roll mode """ track = tlinewidgets.get_track(y) if track == None: return False stop_looping() editorstate.edit_mode = editorstate.TWO_ROLL_TRIM movemodes.clear_selected_clips() # Entering trim edit mode clears selection updater.set_trim_mode_gui() press_frame = tlinewidgets.get_frame(x) trimmodes.set_exit_mode_func = set_default_edit_mode trimmodes.set_no_edit_mode_func = tworoll_trim_no_edit_init success = trimmodes.set_tworoll_mode(track, press_frame) return success
def oneroll_trim_mode_init(x, y): """ User enters ONE_ROLL_TRIM mode from ONE_ROLL_TRIM_NO_EDIT """ track = tlinewidgets.get_track(y) if track == None: return False stop_looping() editorstate.edit_mode = editorstate.ONE_ROLL_TRIM movemodes.clear_selected_clips() # Entering trim edit mode clears selection updater.set_trim_mode_gui() # init mode press_frame = tlinewidgets.get_frame(x) trimmodes.set_exit_mode_func = set_default_edit_mode trimmodes.set_no_edit_mode_func = oneroll_trim_no_edit_init success = trimmodes.set_oneroll_mode(track, press_frame) return success
def tworoll_trim_mode_init(x, y): """ User selects two roll mode """ track = tlinewidgets.get_track(y) if track == None: return False if track_lock_check_and_user_info(track, tworoll_trim_mode_init, "two roll trim mode",): set_default_edit_mode() return False stop_looping() editorstate.edit_mode = editorstate.TWO_ROLL_TRIM movemodes.clear_selected_clips() # Entering trim edit mode clears selection updater.set_trim_mode_gui() press_frame = tlinewidgets.get_frame(x) trimmodes.set_exit_mode_func = set_default_edit_mode trimmodes.set_no_edit_mode_func = tworoll_trim_no_edit_init success = trimmodes.set_tworoll_mode(track, press_frame) return success
def multitrim_mode_pressed(): stop_looping() editorstate.edit_mode = editorstate.MULTI_TRIM tlinewidgets.set_edit_mode(None, None) # No overlays are drawn in this edit mode movemodes.clear_selected_clips() # Entering trim edit mode clears selection updater.set_trim_mode_gui()