Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_sequencer/sequencer_select.c
| Show First 20 Lines • Show All 306 Lines • ▼ Show 20 Lines | void SEQUENCER_OT_select_all(struct wmOperatorType *ot) | ||||
| ot->idname = "SEQUENCER_OT_select_all"; | ot->idname = "SEQUENCER_OT_select_all"; | ||||
| ot->description = "Select or deselect all strips"; | ot->description = "Select or deselect all strips"; | ||||
| /* api callbacks */ | /* api callbacks */ | ||||
| ot->exec = sequencer_de_select_all_exec; | ot->exec = sequencer_de_select_all_exec; | ||||
| ot->poll = sequencer_edit_poll; | ot->poll = sequencer_edit_poll; | ||||
| /* flags */ | /* flags */ | ||||
| ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; | ot->flag = OPTYPE_UNDO; | ||||
| WM_operator_properties_select_all(ot); | WM_operator_properties_select_all(ot); | ||||
| } | } | ||||
| /* (de)select operator */ | /* (de)select operator */ | ||||
| static int sequencer_select_inverse_exec(bContext *C, wmOperator *UNUSED(op)) | static int sequencer_select_inverse_exec(bContext *C, wmOperator *UNUSED(op)) | ||||
| { | { | ||||
| Scene *scene = CTX_data_scene(C); | Scene *scene = CTX_data_scene(C); | ||||
| Show All 24 Lines | void SEQUENCER_OT_select_inverse(struct wmOperatorType *ot) | ||||
| ot->idname = "SEQUENCER_OT_select_inverse"; | ot->idname = "SEQUENCER_OT_select_inverse"; | ||||
| ot->description = "Select unselected strips"; | ot->description = "Select unselected strips"; | ||||
| /* api callbacks */ | /* api callbacks */ | ||||
| ot->exec = sequencer_select_inverse_exec; | ot->exec = sequencer_select_inverse_exec; | ||||
| ot->poll = sequencer_edit_poll; | ot->poll = sequencer_edit_poll; | ||||
| /* flags */ | /* flags */ | ||||
| ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; | ot->flag = OPTYPE_UNDO; | ||||
| } | } | ||||
| static int sequencer_select_exec(bContext *C, wmOperator *op) | static int sequencer_select_exec(bContext *C, wmOperator *op) | ||||
| { | { | ||||
| View2D *v2d = UI_view2d_fromcontext(C); | View2D *v2d = UI_view2d_fromcontext(C); | ||||
| Scene *scene = CTX_data_scene(C); | Scene *scene = CTX_data_scene(C); | ||||
| Editing *ed = BKE_sequencer_editing_get(scene, false); | Editing *ed = BKE_sequencer_editing_get(scene, false); | ||||
| const bool extend = RNA_boolean_get(op->ptr, "extend"); | const bool extend = RNA_boolean_get(op->ptr, "extend"); | ||||
| ▲ Show 20 Lines • Show All 277 Lines • ▼ Show 20 Lines | void SEQUENCER_OT_select(wmOperatorType *ot) | ||||
| /* api callbacks */ | /* api callbacks */ | ||||
| ot->exec = sequencer_select_exec; | ot->exec = sequencer_select_exec; | ||||
| ot->invoke = WM_generic_select_invoke; | ot->invoke = WM_generic_select_invoke; | ||||
| ot->modal = WM_generic_select_modal; | ot->modal = WM_generic_select_modal; | ||||
| ot->poll = ED_operator_sequencer_active; | ot->poll = ED_operator_sequencer_active; | ||||
| /* flags */ | /* flags */ | ||||
| ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; | ot->flag = OPTYPE_UNDO; | ||||
| /* properties */ | /* properties */ | ||||
| WM_operator_properties_generic_select(ot); | WM_operator_properties_generic_select(ot); | ||||
| RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Extend the selection"); | RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Extend the selection"); | ||||
| prop = RNA_def_boolean(ot->srna, | prop = RNA_def_boolean(ot->srna, | ||||
| "deselect_all", | "deselect_all", | ||||
| false, | false, | ||||
| "Deselect On Nothing", | "Deselect On Nothing", | ||||
| ▲ Show 20 Lines • Show All 422 Lines • ▼ Show 20 Lines | void SEQUENCER_OT_select_box(wmOperatorType *ot) | ||||
| ot->invoke = sequencer_box_select_invoke; | ot->invoke = sequencer_box_select_invoke; | ||||
| ot->exec = sequencer_box_select_exec; | ot->exec = sequencer_box_select_exec; | ||||
| ot->modal = WM_gesture_box_modal; | ot->modal = WM_gesture_box_modal; | ||||
| ot->cancel = WM_gesture_box_cancel; | ot->cancel = WM_gesture_box_cancel; | ||||
| ot->poll = ED_operator_sequencer_active; | ot->poll = ED_operator_sequencer_active; | ||||
| /* flags */ | /* flags */ | ||||
| ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; | ot->flag = OPTYPE_UNDO; | ||||
| /* properties */ | /* properties */ | ||||
| WM_operator_properties_gesture_box(ot); | WM_operator_properties_gesture_box(ot); | ||||
| WM_operator_properties_select_operation_simple(ot); | WM_operator_properties_select_operation_simple(ot); | ||||
| PropertyRNA *prop = RNA_def_boolean( | PropertyRNA *prop = RNA_def_boolean( | ||||
| ot->srna, "tweak", 0, "Tweak", "Operator has been activated using a tweak event"); | ot->srna, "tweak", 0, "Tweak", "Operator has been activated using a tweak event"); | ||||
| RNA_def_property_flag(prop, PROP_SKIP_SAVE); | RNA_def_property_flag(prop, PROP_SKIP_SAVE); | ||||
| ▲ Show 20 Lines • Show All 364 Lines • Show Last 20 Lines | |||||