Пример #1
0
def overwrite_move_move(x, y, frame, state):
    """
    User moves mouse when in overwrite move mode.
    """
    if editorstate.overwrite_mode_box == True:
        boxmove.mouse_move(x, y, frame)
        return
        
    global edit_data, drag_disabled    
    if drag_disabled:
        return 
    if edit_data == None:
        return
    
    _move_mode_move(frame, x, y)

    # Calculate overwrite area if moving
    if edit_data["move_on"] == True:
        # get in point
        over_in = edit_data["attempt_insert_frame"]
        
        # Check and do magnet
        cut_x = tlinewidgets._get_frame_x(edit_data["insert_frame"])
        clip_head_x = tlinewidgets._get_frame_x(edit_data["attempt_insert_frame"])
        if abs(clip_head_x - cut_x) < MAGNETIC_AREA_IN_PIX:
            over_in = edit_data["insert_frame"]

        over_out = over_in + edit_data["moving_length"] 

        edit_data["over_in"] = over_in
        edit_data["over_out"] = over_out

    updater.repaint_tline()
Пример #2
0
def overwrite_move_move(x, y, frame, state):
    """
    User moves mouse when in overwrite move mode.
    """
    if editorstate.overwrite_mode_box == True:
        boxmove.mouse_move(x, y, frame)
        return
        
    global edit_data, drag_disabled    
    if drag_disabled:
        return 
    if edit_data == None:
        return
    
    _move_mode_move(frame, x, y)

    # Calculate overwrite area if moving
    if edit_data["move_on"] == True:
        # get in point
        over_in = edit_data["attempt_insert_frame"]
        
        # Check and do magnet
        cut_x = tlinewidgets._get_frame_x(edit_data["insert_frame"])
        clip_head_x = tlinewidgets._get_frame_x(edit_data["attempt_insert_frame"])
        if abs(clip_head_x - cut_x) < MAGNETIC_AREA_IN_PIX:
            over_in = edit_data["insert_frame"]

        over_out = over_in + edit_data["moving_length"] 

        edit_data["over_in"] = over_in
        edit_data["over_out"] = over_out

    updater.repaint_tline()