コード例 #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)
コード例 #2
0
ファイル: movemodes.py プロジェクト: ptrg/flowblade
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)
コード例 #3
0
ファイル: movemodes.py プロジェクト: williams-lu/flowblade
def overwrite_move_press(event, frame):
    """
    User presses mouse when in overwrite move mode.
    """
    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 (not (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