def _filter_mask_item_activated(widget, data): if clip == None: return full_stack_mask, msg = data filter_info_1 = mltfilters.get_filter_mask_filter(msg) filter_info_2 = mltfilters.get_filter_mask_filter("Mask - End") if full_stack_mask == True: index_1 = 0 index_2 = len(clip.filters) + 1 else: if current_filter_index != -1: index_1 = current_filter_index index_2 = current_filter_index + 2 else: index_1 = 0 index_2 = len(clip.filters) + 1 data = { "clip": clip, "filter_info_1": filter_info_1, "filter_info_2": filter_info_2, "index_1": index_1, "index_2": index_2, "filter_edit_done_func": filter_edit_done } action = edit.add_two_filters_action(data) action.do_edit()
def _filter_mask_item_activated(widget, data): if _filter_stack == None: return False clip, track, clip_index = _filter_stack.get_clip_data() full_stack_mask, msg, current_filter_index = data filter_info_1 = mltfilters.get_filter_mask_filter(msg) filter_info_2 = mltfilters.get_filter_mask_filter("Mask - End") if full_stack_mask == True: index_1 = 0 index_2 = len(clip.filters) + 1 else: if current_filter_index != -1: index_1 = current_filter_index index_2 = current_filter_index + 2 else: index_1 = 0 index_2 = len(clip.filters) + 1 data = { "clip": clip, "filter_info_1": filter_info_1, "filter_info_2": filter_info_2, "index_1": index_1, "index_2": index_2, "filter_edit_done_func": filter_edit_done_stack_update } action = edit.add_two_filters_action(data) set_stack_update_blocked() action.do_edit() set_stack_update_unblocked() set_clip(clip, track, clip_index) _filter_stack.set_filter_item_expanded(current_filter_index + 1)