def paste_action(): if _timeline_has_focus() == False: copy_paste_object = editorstate.get_copy_paste_objects() if copy_paste_object == None: return data_type, paste_data = editorstate.get_copy_paste_objects() if data_type == appconsts.COPY_PASTE_KEYFRAME_EDITOR_KF_DATA: value, kf_editor = paste_data kf_editor.paste_kf_value(value) elif data_type == appconsts.COPY_PASTE_GEOMETRY_EDITOR_KF_DATA: value, geom_editor = paste_data geom_editor.paste_kf_value(value) else: tlineaction.do_timeline_objects_paste()
def do_timeline_objects_paste(): if _timeline_has_focus() == False: return track = current_sequence().get_first_active_track() if track == None: return paste_objs = editorstate.get_copy_paste_objects() if paste_objs == None: return data_type, paste_clips = paste_objs if data_type != COPY_PASTA_DATA_CLIPS: do_compositor_data_paste(paste_objs) return tline_pos = editorstate.current_tline_frame() new_clips = [] for clip in paste_clips: new_clip = current_sequence().create_clone_clip(clip) new_clips.append(new_clip) editorstate.set_copy_paste_objects((COPY_PASTA_DATA_CLIPS, new_clips)) # Paste clips editevent.do_multiple_clip_insert(track, paste_clips, tline_pos)
def do_timeline_filters_paste(): if _timeline_has_focus() == False: return track = current_sequence().get_first_active_track() if track == None: return paste_objs = editorstate.get_copy_paste_objects() if paste_objs == None: return if movemodes.selected_track == -1: return target_clips = [] track = current_sequence().tracks[movemodes.selected_track] for i in range(movemodes.selected_range_in, movemodes.selected_range_out + 1): target_clips.append(track.clips[i]) # First clip of selection is used as filters source source_clip = paste_objs[0] # Currently selected clips are target clips target_clips = [] track = current_sequence().tracks[movemodes.selected_track] for i in range(movemodes.selected_range_in, movemodes.selected_range_out + 1): target_clips.append(track.clips[i]) for target_clip in target_clips: data = {"clip":target_clip,"clone_source_clip":source_clip} action = edit.paste_filters_action(data) action.do_edit()
def do_timeline_filters_paste(): if _timeline_has_focus() == False: return track = current_sequence().get_first_active_track() if track == None: return paste_objs = editorstate.get_copy_paste_objects() if paste_objs == None: return if movemodes.selected_track == -1: return target_clips = [] track = current_sequence().tracks[movemodes.selected_track] for i in range(movemodes.selected_range_in, movemodes.selected_range_out + 1): target_clips.append(track.clips[i]) # First clip of selection is used as filters source source_clip = paste_objs[0] # Currently selected clips are target clips target_clips = [] track = current_sequence().tracks[movemodes.selected_track] for i in range(movemodes.selected_range_in, movemodes.selected_range_out + 1): target_clips.append(track.clips[i]) for target_clip in target_clips: data = {"clip": target_clip, "clone_source_clip": source_clip} action = edit.paste_filters_action(data) action.do_edit()
def do_timeline_objects_paste(): track = current_sequence().get_first_active_track() if track == None: return paste_objs = editorstate.get_copy_paste_objects() if paste_objs == None: return tline_pos = editorstate.current_tline_frame() new_clips = [] for clip in paste_objs: new_clip = current_sequence().create_clone_clip(clip) new_clips.append(new_clip) editorstate.set_copy_paste_objects(new_clips) # Paste clips editevent.do_multiple_clip_insert(track, paste_objs, tline_pos)