def delete_effect_pressed(): if len(clip.filters) == 0: return # Block updates until we have set selected row global edit_effect_update_blocked edit_effect_update_blocked = True """ treeselection = widgets.effect_stack_view.treeview.get_selection() (model, rows) = treeselection.get_selected_rows() try: row = rows[0] except: return # This fails when there are filters but no rows are selected """ #row_index = current_filter_index data = { "clip": clip, "index": current_filter_index, "filter_edit_done_func": filter_edit_done } action = edit.remove_filter_action(data) action.do_edit() updater.repaint_tline() # Set last filter selected and display in editor edit_effect_update_blocked = False if len(clip.filters) == 0: return path = str(len(clip.filters) - 1) # Causes edit_effect_selected() called as it is the "change" listener widgets.effect_stack_view.treeview.get_selection().select_path(path)
def delete_effect_pressed(): if len(clip.filters) == 0: return # Block updates until we have set selected row global edit_effect_update_blocked edit_effect_update_blocked = True data = { "clip": clip, "index": current_filter_index, "filter_edit_done_func": filter_edit_done } action = edit.remove_filter_action(data) action.do_edit() updater.repaint_tline() # Set last filter selected and display in editor edit_effect_update_blocked = False if len(clip.filters) == 0: effect_selection_changed() # to display info text return path = str(len(clip.filters) - 1) # Causes edit_effect_selected() called as it is the "change" listener widgets.effect_stack_view.treeview.get_selection().select_path(path)
def delete_effect_pressed(): if len(clip.filters) == 0: return # Block updates until we have set selected row global edit_effect_update_blocked edit_effect_update_blocked = True treeselection = widgets.effect_stack_view.treeview.get_selection() (model, rows) = treeselection.get_selected_rows() try: row = rows[0] except: return # This fails when there are filters but no rows are selected row_index = max(row) data = {"clip":clip, "index":row_index, "filter_edit_done_func":filter_edit_done} action = edit.remove_filter_action(data) action.do_edit() updater.repaint_tline() # Set last filter selected and display in editor edit_effect_update_blocked = False if len(clip.filters) == 0: return path = str(len(clip.filters) - 1) # Causes edit_effect_selected() called as it is the "change" listener widgets.effect_stack_view.treeview.get_selection().select_path(path)
def delete_effect_pressed(clip, filter_index): set_stack_update_blocked() current_filter = clip.filters[filter_index] if current_filter.info.filter_mask_filter == "": # Clear keyframe editors from update list _filter_stack.clear_kf_editors_from_update_list(current_filter) # Regular filters data = { "clip": clip, "index": filter_index, "filter_edit_done_func": filter_edit_done_stack_update } action = edit.remove_filter_action(data) action.do_edit() else: # Filter mask filters. index_1 = -1 index_2 = -1 for i in range(0, len(clip.filters)): f = clip.filters[i] if f.info.filter_mask_filter != "": if index_1 == -1: index_1 = i else: index_2 = i # Clear keyframe editors from update list filt_1 = clip.filters[index_1] filt_2 = clip.filters[index_2] _filter_stack.clear_kf_editors_from_update_list(filt_1) _filter_stack.clear_kf_editors_from_update_list(filt_2) # Do edit data = { "clip": clip, "index_1": index_1, "index_2": index_2, "filter_edit_done_func": filter_edit_done_stack_update } action = edit.remove_two_filters_action(data) action.do_edit() set_stack_update_unblocked() clip, track, clip_index = _filter_stack.get_clip_data() set_clip(clip, track, clip_index) updater.repaint_tline()
def delete_effect_pressed(): if len(clip.filters) == 0: return # Block updates until we have set selected row global edit_effect_update_blocked edit_effect_update_blocked = True current_filter = clip.filters[current_filter_index] if current_filter.info.filter_mask_filter == "": # Regular filters data = { "clip": clip, "index": current_filter_index, "filter_edit_done_func": filter_edit_done } action = edit.remove_filter_action(data) action.do_edit() else: # Filter mask filters. index_1 = -1 index_2 = -1 for i in range(0, len(clip.filters)): f = clip.filters[i] if f.info.filter_mask_filter != "": if index_1 == -1: index_1 = i else: index_2 = i data = { "clip": clip, "index_1": index_1, "index_2": index_2, "filter_edit_done_func": filter_edit_done } action = edit.remove_two_filters_action(data) action.do_edit() updater.repaint_tline() # Set last filter selected and display in editor edit_effect_update_blocked = False if len(clip.filters) == 0: effect_selection_changed() # to display info text return path = str(len(clip.filters) - 1) # Causes edit_effect_selected() called as it is the "change" listener widgets.effect_stack_view.treeview.get_selection().select_path(path)
def delete_effect_pressed(): if len(clip.filters) == 0: return # Block updates until we have set selected row global edit_effect_update_blocked edit_effect_update_blocked = True data = {"clip":clip, "index":current_filter_index, "filter_edit_done_func":filter_edit_done} action = edit.remove_filter_action(data) action.do_edit() updater.repaint_tline() # Set last filter selected and display in editor edit_effect_update_blocked = False if len(clip.filters) == 0: effect_selection_changed() # to display info text return path = str(len(clip.filters) - 1) # Causes edit_effect_selected() called as it is the "change" listener widgets.effect_stack_view.treeview.get_selection().select_path(path)