Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_sequencer.c
| Show First 20 Lines • Show All 1,180 Lines • ▼ Show 20 Lines | static void rna_Sequence_modifier_clear(Sequence *seq, bContext *C) | ||||
| BKE_sequence_modifier_clear(seq); | BKE_sequence_modifier_clear(seq); | ||||
| BKE_sequence_invalidate_cache_preprocessed(scene, seq); | BKE_sequence_invalidate_cache_preprocessed(scene, seq); | ||||
| WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, NULL); | WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, NULL); | ||||
| } | } | ||||
| static void rna_SequenceModifier_strip_set(PointerRNA *ptr, | |||||
| PointerRNA value, | |||||
| struct ReportList *reports) | |||||
| { | |||||
| SequenceModifierData *smd = ptr->data; | |||||
| Scene *scene = (Scene *)ptr->owner_id; | |||||
| Editing *ed = BKE_sequencer_editing_get(scene, false); | |||||
| Sequence *seq = sequence_get_by_modifier(ed, smd); | |||||
| Sequence *target = (Sequence *)value.data; | |||||
| if (BKE_sequencer_check_recursivity(ed, seq, target)) { | |||||
| BKE_report(reports, RPT_ERROR, "Recursion detected, can not use this strip!"); | |||||
| return; | |||||
| } | |||||
| smd->mask_sequence = target; | |||||
| } | |||||
| static float rna_Sequence_fps_get(PointerRNA *ptr) | static float rna_Sequence_fps_get(PointerRNA *ptr) | ||||
| { | { | ||||
| Scene *scene = (Scene *)ptr->owner_id; | Scene *scene = (Scene *)ptr->owner_id; | ||||
| Sequence *seq = (Sequence *)(ptr->data); | Sequence *seq = (Sequence *)(ptr->data); | ||||
| return BKE_sequence_get_fps(scene, seq); | return BKE_sequence_get_fps(scene, seq); | ||||
| } | } | ||||
| #else | #else | ||||
| ▲ Show 20 Lines • Show All 1,777 Lines • ▼ Show 20 Lines | static void rna_def_modifier(BlenderRNA *brna) | ||||
| prop = RNA_def_property(srna, "mask_time", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "mask_time", PROP_ENUM, PROP_NONE); | ||||
| RNA_def_property_enum_sdna(prop, NULL, "mask_time"); | RNA_def_property_enum_sdna(prop, NULL, "mask_time"); | ||||
| RNA_def_property_enum_items(prop, mask_time_items); | RNA_def_property_enum_items(prop, mask_time_items); | ||||
| RNA_def_property_ui_text(prop, "Mask Time", "Time to use for the Mask animation"); | RNA_def_property_ui_text(prop, "Mask Time", "Time to use for the Mask animation"); | ||||
| RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceModifier_update"); | RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceModifier_update"); | ||||
| prop = RNA_def_property(srna, "input_mask_strip", PROP_POINTER, PROP_NONE); | prop = RNA_def_property(srna, "input_mask_strip", PROP_POINTER, PROP_NONE); | ||||
| RNA_def_property_pointer_sdna(prop, NULL, "mask_sequence"); | RNA_def_property_pointer_sdna(prop, NULL, "mask_sequence"); | ||||
| RNA_def_property_pointer_funcs( | RNA_def_property_pointer_funcs(prop, | ||||
| prop, NULL, NULL, NULL, "rna_SequenceModifier_otherSequence_poll"); | NULL, | ||||
| "rna_SequenceModifier_strip_set", | |||||
| NULL, | |||||
| "rna_SequenceModifier_otherSequence_poll"); | |||||
| RNA_def_property_flag(prop, PROP_EDITABLE); | RNA_def_property_flag(prop, PROP_EDITABLE); | ||||
| RNA_def_property_ui_text(prop, "Mask Strip", "Strip used as mask input for the modifier"); | RNA_def_property_ui_text(prop, "Mask Strip", "Strip used as mask input for the modifier"); | ||||
| RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceModifier_update"); | RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceModifier_update"); | ||||
| prop = RNA_def_property(srna, "input_mask_id", PROP_POINTER, PROP_NONE); | prop = RNA_def_property(srna, "input_mask_id", PROP_POINTER, PROP_NONE); | ||||
| RNA_def_property_pointer_sdna(prop, NULL, "mask_id"); | RNA_def_property_pointer_sdna(prop, NULL, "mask_id"); | ||||
| RNA_def_property_flag(prop, PROP_EDITABLE); | RNA_def_property_flag(prop, PROP_EDITABLE); | ||||
| RNA_def_property_ui_text(prop, "Mask", "Mask ID used as mask input for the modifier"); | RNA_def_property_ui_text(prop, "Mask", "Mask ID used as mask input for the modifier"); | ||||
| ▲ Show 20 Lines • Show All 196 Lines • Show Last 20 Lines | |||||