Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_sequencer/sequencer_edit.c
| Show First 20 Lines • Show All 992 Lines • ▼ Show 20 Lines | |||||
| ot->description = "Duplicate the selected strips"; | ot->description = "Duplicate the selected strips"; | ||||
| /* api callbacks */ | /* api callbacks */ | ||||
| ot->exec = sequencer_add_duplicate_exec; | ot->exec = sequencer_add_duplicate_exec; | ||||
| ot->poll = ED_operator_sequencer_active; | ot->poll = ED_operator_sequencer_active; | ||||
| /* flags */ | /* flags */ | ||||
| ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; | ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; | ||||
| /* to give to transform */ | |||||
| RNA_def_enum(ot->srna, "mode", rna_enum_transform_mode_types, TFM_TRANSLATION, "Mode", ""); | |||||
| } | } | ||||
| /* delete operator */ | /* delete operator */ | ||||
| static int sequencer_delete_exec(bContext *C, wmOperator *UNUSED(op)) | static int sequencer_delete_exec(bContext *C, wmOperator *UNUSED(op)) | ||||
| { | { | ||||
| Main *bmain = CTX_data_main(C); | Main *bmain = CTX_data_main(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); | ||||
| ▲ Show 20 Lines • Show All 517 Lines • ▼ Show 20 Lines | |||||
| ot->idname = "SEQUENCER_OT_view_frame"; | ot->idname = "SEQUENCER_OT_view_frame"; | ||||
| ot->description = "Reset viewable area to show range around current frame"; | ot->description = "Reset viewable area to show range around current frame"; | ||||
| /* api callbacks */ | /* api callbacks */ | ||||
| ot->exec = sequencer_view_frame_exec; | ot->exec = sequencer_view_frame_exec; | ||||
| ot->poll = ED_operator_sequencer_active; | ot->poll = ED_operator_sequencer_active; | ||||
| /* flags */ | /* flags */ | ||||
| ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; | ot->flag = OPTYPE_REGISTER; | ||||
ISS: why remove undo here? | |||||
a.montiAuthorUnsubmitted Not Done Inline ActionsRight now you basically waste an undo step here, since Ctrl-z doesn't restore the previous view location. And even if it was possible to implement it, it would be quite useless imho. Anyway I forgot to move this to D6249, where I did the same thing to other editors, will do now. a.monti: Right now you basically waste an undo step here, since Ctrl-z doesn't restore the previous view… | |||||
| } | } | ||||
| /* view_all operator */ | /* view_all operator */ | ||||
| static int sequencer_view_all_preview_exec(bContext *C, wmOperator *UNUSED(op)) | static int sequencer_view_all_preview_exec(bContext *C, wmOperator *UNUSED(op)) | ||||
| { | { | ||||
| bScreen *sc = CTX_wm_screen(C); | bScreen *sc = CTX_wm_screen(C); | ||||
| ScrArea *area = CTX_wm_area(C); | ScrArea *area = CTX_wm_area(C); | ||||
| #if 0 | #if 0 | ||||
| ▲ Show 20 Lines • Show All 274 Lines • ▼ Show 20 Lines | |||||
| ot->idname = "SEQUENCER_OT_strip_jump"; | ot->idname = "SEQUENCER_OT_strip_jump"; | ||||
| ot->description = "Move frame to previous edit point"; | ot->description = "Move frame to previous edit point"; | ||||
| /* api callbacks */ | /* api callbacks */ | ||||
| ot->exec = sequencer_strip_jump_exec; | ot->exec = sequencer_strip_jump_exec; | ||||
| ot->poll = sequencer_strip_jump_poll; | ot->poll = sequencer_strip_jump_poll; | ||||
| /* flags */ | /* flags */ | ||||
| ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; | ot->flag = OPTYPE_UNDO; | ||||
| /* properties */ | /* properties */ | ||||
| RNA_def_boolean(ot->srna, "next", true, "Next Strip", ""); | RNA_def_boolean(ot->srna, "next", true, "Next Strip", ""); | ||||
| RNA_def_boolean(ot->srna, "center", true, "Use strip center", ""); | RNA_def_boolean(ot->srna, "center", true, "Use strip center", ""); | ||||
| } | } | ||||
| static void swap_sequence(Scene *scene, Sequence *seqa, Sequence *seqb) | static void swap_sequence(Scene *scene, Sequence *seqa, Sequence *seqb) | ||||
| { | { | ||||
| ▲ Show 20 Lines • Show All 1,076 Lines • ▼ Show 20 Lines | |||||
| /* api callbacks */ | /* api callbacks */ | ||||
| ot->exec = sequencer_set_range_to_strips_exec; | ot->exec = sequencer_set_range_to_strips_exec; | ||||
| ot->poll = sequencer_edit_poll; | ot->poll = sequencer_edit_poll; | ||||
| /* flags */ | /* flags */ | ||||
| ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; | ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; | ||||
| prop = RNA_def_boolean(ot->srna, "preview", false, "Preview", "Set the preview range instead"); | prop = RNA_def_boolean(ot->srna, "preview", false, "Preview", "Set the preview range instead"); | ||||
| RNA_def_property_flag(prop, PROP_SKIP_SAVE); | RNA_def_property_flag(prop, PROP_SKIP_SAVE | PROP_HIDDEN); | ||||
| } | } | ||||
| Context not available. | |||||
why remove undo here?