Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_sequencer/sequencer_edit.c
| Show First 20 Lines • Show All 2,370 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 bool sequencer_edit_poll_property(const bContext *UNUSED(C), | |||||
| wmOperator *op, | |||||
| const PropertyRNA *prop) | |||||
| { | |||||
| const char *prop_id = RNA_property_identifier(prop); | |||||
| if (STREQ(prop_id, "channel")) { | |||||
| if (!RNA_boolean_get(op->ptr, "use_cursor_position")) { | |||||
| return false; | |||||
| } | |||||
| } | |||||
| return true; | |||||
| } | |||||
| 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->poll_property = sequencer_edit_poll_property; | |||||
| /* 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 | |||||