Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_sequencer/sequencer_add.c
| Show First 20 Lines • Show All 1,204 Lines • ▼ Show 20 Lines | if (is_type_set) { | ||||
| } | } | ||||
| } | } | ||||
| sequencer_generic_invoke_xy__internal(C, op, prop_flag, type); | sequencer_generic_invoke_xy__internal(C, op, prop_flag, type); | ||||
| return sequencer_add_effect_strip_exec(C, op); | return sequencer_add_effect_strip_exec(C, op); | ||||
| } | } | ||||
| static char *sequencer_add_effect_strip_desc(bContext *UNUSED(C), | |||||
| wmOperatorType *UNUSED(op), | |||||
| PointerRNA *ptr) | |||||
| { | |||||
| const int type = RNA_enum_get(ptr, "type"); | |||||
| switch (type) { | |||||
| case SEQ_TYPE_CROSS: | |||||
| return BLI_strdup(TIP_("Add a crossfade transition to the sequencer")); | |||||
| case SEQ_TYPE_ADD: | |||||
| return BLI_strdup(TIP_("Add an add effect strip to the sequencer")); | |||||
| case SEQ_TYPE_SUB: | |||||
| return BLI_strdup(TIP_("Add a subtract effect strip to the sequencer")); | |||||
| case SEQ_TYPE_ALPHAOVER: | |||||
| return BLI_strdup(TIP_("Add an alpha over effect strip to the sequencer")); | |||||
| case SEQ_TYPE_ALPHAUNDER: | |||||
| return BLI_strdup(TIP_("Add an alpha under effect strip to the sequencer")); | |||||
| case SEQ_TYPE_GAMCROSS: | |||||
| return BLI_strdup(TIP_("Add a gamma cross transition to the sequencer")); | |||||
| case SEQ_TYPE_MUL: | |||||
| return BLI_strdup(TIP_("Add a multiply effect strip to the sequencer")); | |||||
| case SEQ_TYPE_OVERDROP: | |||||
| return BLI_strdup(TIP_("Add an alpha over drop effect strip to the sequencer")); | |||||
| case SEQ_TYPE_WIPE: | |||||
| return BLI_strdup(TIP_("Add a wipe transition to the sequencer")); | |||||
| case SEQ_TYPE_GLOW: | |||||
| return BLI_strdup(TIP_("Add a glow effect strip to the sequencer")); | |||||
| case SEQ_TYPE_TRANSFORM: | |||||
| return BLI_strdup(TIP_("Add a transform effect strip to the sequencer")); | |||||
| case SEQ_TYPE_COLOR: | |||||
| return BLI_strdup(TIP_("Add a color strip to the sequencer")); | |||||
| case SEQ_TYPE_SPEED: | |||||
| return BLI_strdup(TIP_("Add a speed effect strip to the sequencer")); | |||||
| case SEQ_TYPE_MULTICAM: | |||||
| return BLI_strdup(TIP_("Add a multicam selector effect strip to the sequencer")); | |||||
| case SEQ_TYPE_ADJUSTMENT: | |||||
| return BLI_strdup(TIP_("Add an adjustment layer effect strip to the sequencer")); | |||||
| case SEQ_TYPE_GAUSSIAN_BLUR: | |||||
| return BLI_strdup(TIP_("Add a gaussian blur effect strip to the sequencer")); | |||||
| case SEQ_TYPE_TEXT: | |||||
| return BLI_strdup(TIP_("Add a text strip to the sequencer")); | |||||
| case SEQ_TYPE_COLORMIX: | |||||
| return BLI_strdup(TIP_("Add a color mix effect strip to the sequencer")); | |||||
| default: | |||||
| break; | |||||
| } | |||||
| /* Use default description. */ | |||||
| return NULL; | |||||
| } | |||||
| void SEQUENCER_OT_effect_strip_add(struct wmOperatorType *ot) | void SEQUENCER_OT_effect_strip_add(struct wmOperatorType *ot) | ||||
| { | { | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| /* Identifiers. */ | /* Identifiers. */ | ||||
| ot->name = "Add Effect Strip"; | ot->name = "Add Effect Strip"; | ||||
| ot->idname = "SEQUENCER_OT_effect_strip_add"; | ot->idname = "SEQUENCER_OT_effect_strip_add"; | ||||
| ot->description = "Add an effect to the sequencer, most are applied on top of existing strips"; | ot->description = "Add an effect to the sequencer, most are applied on top of existing strips"; | ||||
| /* Api callbacks. */ | /* Api callbacks. */ | ||||
| ot->invoke = sequencer_add_effect_strip_invoke; | ot->invoke = sequencer_add_effect_strip_invoke; | ||||
| ot->exec = sequencer_add_effect_strip_exec; | ot->exec = sequencer_add_effect_strip_exec; | ||||
| ot->poll = ED_operator_sequencer_active_editable; | ot->poll = ED_operator_sequencer_active_editable; | ||||
| ot->poll_property = seq_effect_add_properties_poll; | ot->poll_property = seq_effect_add_properties_poll; | ||||
| ot->get_description = sequencer_add_effect_strip_desc; | |||||
| /* Flags. */ | /* Flags. */ | ||||
| ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; | ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; | ||||
| RNA_def_enum(ot->srna, | RNA_def_enum(ot->srna, | ||||
| "type", | "type", | ||||
| sequencer_prop_effect_types, | sequencer_prop_effect_types, | ||||
| SEQ_TYPE_CROSS, | SEQ_TYPE_CROSS, | ||||
| Show All 16 Lines | |||||