Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_sequencer/sequencer_edit.c
| Show First 20 Lines • Show All 52 Lines • ▼ Show 20 Lines | |||||
| /* For menu, popup, icons, etc. */ | /* For menu, popup, icons, etc. */ | ||||
| #include "ED_numinput.h" | #include "ED_numinput.h" | ||||
| #include "ED_outliner.h" | #include "ED_outliner.h" | ||||
| #include "ED_screen.h" | #include "ED_screen.h" | ||||
| #include "ED_sequencer.h" | #include "ED_sequencer.h" | ||||
| #include "UI_interface.h" | #include "UI_interface.h" | ||||
| #include "UI_resources.h" | |||||
| #include "UI_view2d.h" | #include "UI_view2d.h" | ||||
| #include "DEG_depsgraph.h" | #include "DEG_depsgraph.h" | ||||
| #include "DEG_depsgraph_build.h" | #include "DEG_depsgraph_build.h" | ||||
| /* Own include. */ | /* Own include. */ | ||||
| #include "sequencer_intern.h" | #include "sequencer_intern.h" | ||||
| ▲ Show 20 Lines • Show All 2,302 Lines • ▼ Show 20 Lines | static int sequencer_split_invoke(bContext *C, wmOperator *op, const wmEvent *event) | ||||
| } | } | ||||
| RNA_int_set(op->ptr, "channel", mouseloc[1]); | RNA_int_set(op->ptr, "channel", mouseloc[1]); | ||||
| RNA_enum_set(op->ptr, "side", split_side); | RNA_enum_set(op->ptr, "side", split_side); | ||||
| /*RNA_enum_set(op->ptr, "type", split_hard); */ | /*RNA_enum_set(op->ptr, "type", split_hard); */ | ||||
| return sequencer_split_exec(C, op); | return sequencer_split_exec(C, op); | ||||
| } | } | ||||
| static void sequencer_split_ui(bContext *UNUSED(C), wmOperator *op) | |||||
| { | |||||
| uiLayout *layout = op->layout; | |||||
| uiLayoutSetPropSep(layout, true); | |||||
| uiLayoutSetPropDecorate(layout, false); | |||||
| PointerRNA ptr; | |||||
| RNA_pointer_create(NULL, op->type->srna, op->properties, &ptr); | |||||
| uiLayout *row = uiLayoutRow(layout, false); | |||||
| uiItemR(row, &ptr, "type", UI_ITEM_R_EXPAND, NULL, ICON_NONE); | |||||
| uiItemR(layout, &ptr, "frame", 0, NULL, ICON_NONE); | |||||
| uiItemR(layout, &ptr, "side", 0, NULL, ICON_NONE); | |||||
| uiItemS(layout); | |||||
| uiItemR(layout, &ptr, "use_cursor_position", 0, NULL, ICON_NONE); | |||||
| if (RNA_boolean_get(&ptr, "use_cursor_position")) { | |||||
| uiItemR(layout, &ptr, "channel", 0, NULL, ICON_NONE); | |||||
| } | |||||
| } | |||||
| void SEQUENCER_OT_split(struct wmOperatorType *ot) | void SEQUENCER_OT_split(struct wmOperatorType *ot) | ||||
| { | { | ||||
| /* Identifiers. */ | /* Identifiers. */ | ||||
| ot->name = "Split Strips"; | ot->name = "Split Strips"; | ||||
| ot->idname = "SEQUENCER_OT_split"; | ot->idname = "SEQUENCER_OT_split"; | ||||
| ot->description = "Split the selected strips in two"; | ot->description = "Split the selected strips in two"; | ||||
| /* Api callbacks. */ | /* Api callbacks. */ | ||||
| ot->invoke = sequencer_split_invoke; | ot->invoke = sequencer_split_invoke; | ||||
| ot->exec = sequencer_split_exec; | ot->exec = sequencer_split_exec; | ||||
| ot->poll = sequencer_edit_poll; | ot->poll = sequencer_edit_poll; | ||||
| ot->ui = sequencer_split_ui; | |||||
| /* Flags. */ | /* Flags. */ | ||||
| ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; | ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| RNA_def_int(ot->srna, | RNA_def_int(ot->srna, | ||||
| "frame", | "frame", | ||||
| 0, | 0, | ||||
| ▲ Show 20 Lines • Show All 1,721 Lines • Show Last 20 Lines | |||||