Exemple #1
0
def overwrite_move_press(event, frame):
    """
    User presses mouse when in overwrite move mode.
    """
    # This happens when we already have a box selection and now are trying to move it
    if editorstate.overwrite_mode_box == True:
        boxmove.mouse_press(event, frame)
        return

    tlinewidgets.set_edit_mode(None, tlinewidgets.draw_overwrite_overlay) # if we were in box mode draw func needs to be reset here
    
    _move_mode_pressed(event, frame)
    
    global edit_data
    if edit_data != None:
        edit_data["over_in"] = -1
        edit_data["over_out"] = -1
        
        # Length of moving clip/s
        moving_length = 0
        clip_lengths = edit_data["clip_lengths"] 
        for length in clip_lengths:
            moving_length += length
        edit_data["moving_length"] = moving_length
    else:
        if editorpersistance.prefs.box_for_empty_press_in_overwrite_tool == True:
            # We now enter box mode with special flag set that we will return to overwrite after edit complete
            editorstate.overwrite_mode_box = True
            boxmove.entered_from_overwrite = True
            boxmove.clear_data()
            # This happens when we start drawing a box
            boxmove.mouse_press(event, frame)
Exemple #2
0
def overwrite_move_press(event, frame):
    """
    User presses mouse when in overwrite move mode.
    """
    # This happens when we already have a box selection and now are trying to move it
    if editorstate.overwrite_mode_box == True:
        boxmove.mouse_press(event, frame)
        return

    tlinewidgets.set_edit_mode(None, tlinewidgets.draw_overwrite_overlay) # if we were in box mode draw func needs to be reset here
    
    _move_mode_pressed(event, frame)
    
    global edit_data
    if edit_data != None:
        edit_data["over_in"] = -1
        edit_data["over_out"] = -1
        
        # Length of moving clip/s
        moving_length = 0
        clip_lengths = edit_data["clip_lengths"] 
        for length in clip_lengths:
            moving_length += length
        edit_data["moving_length"] = moving_length
    else:
        if editorpersistance.prefs.box_for_empty_press_in_overwrite_tool == True:
            # We now enter box mode with special flag set that we will return to overwrite after edit complete
            editorstate.overwrite_mode_box = True
            boxmove.entered_from_overwrite = True
            boxmove.clear_data()
            # This happens when we start drawing a box
            boxmove.mouse_press(event, frame)
Exemple #3
0
def box_mode_pressed():
    """
    User selects Box tool.
    """
    stop_looping()
    current_sequence().clear_hidden_track()

    # Box tool is implemeted as sub mode of OVERWRITE_MOVE
    editorstate.edit_mode = editorstate.OVERWRITE_MOVE
    editorstate.overwrite_mode_box = True
    boxmove.clear_data()

    tlinewidgets.set_edit_mode(None, None)  # these get set later for box move

    _set_move_mode()
Exemple #4
0
def box_mode_pressed():
    """
    User selects Box tool.
    """
    stop_looping()
    current_sequence().clear_hidden_track()
    
    # Box tool is implemeted as sub mode of OVERWRITE_MOVE
    editorstate.edit_mode = editorstate.OVERWRITE_MOVE
    editorstate.overwrite_mode_box = True
    boxmove.clear_data()
    boxmove.entered_from_overwrite = False
            
    tlinewidgets.set_edit_mode(None, None) # these get set later for box move
        
    _set_move_mode()