Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_sequencer.c
| Show First 20 Lines • Show All 338 Lines • ▼ Show 20 Lines | static void rna_Sequence_anim_endofs_final_set(PointerRNA *ptr, int value) | ||||
| Scene *scene = (Scene *)ptr->owner_id; | Scene *scene = (Scene *)ptr->owner_id; | ||||
| seq->anim_endofs = MIN2(value, seq->len + seq->anim_endofs); | seq->anim_endofs = MIN2(value, seq->len + seq->anim_endofs); | ||||
| BKE_sequence_reload_new_file(G.main, scene, seq, false); | BKE_sequence_reload_new_file(G.main, scene, seq, false); | ||||
| do_sequence_frame_change_update(scene, seq); | do_sequence_frame_change_update(scene, seq); | ||||
| } | } | ||||
| static void rna_Sequence_anim_endofs_final_range( | |||||
| PointerRNA *ptr, int *min, int *max, int *UNUSED(softmin), int *UNUSED(softmax)) | |||||
| { | |||||
| Sequence *seq = (Sequence *)ptr->data; | |||||
| *min = 0; | |||||
| *max = seq->len + seq->anim_endofs - seq->startofs - seq->endofs - 1; | |||||
| } | |||||
| static void rna_Sequence_anim_startofs_final_range( | |||||
| PointerRNA *ptr, int *min, int *max, int *UNUSED(softmin), int *UNUSED(softmax)) | |||||
| { | |||||
| Sequence *seq = (Sequence *)ptr->data; | |||||
| *min = 0; | |||||
| *max = seq->len + seq->anim_startofs - seq->startofs - seq->endofs - 1; | |||||
| } | |||||
| static void rna_Sequence_frame_offset_start_range( | |||||
| PointerRNA *ptr, int *min, int *max, int *UNUSED(softmin), int *UNUSED(softmax)) | |||||
| { | |||||
| Sequence *seq = (Sequence *)ptr->data; | |||||
| *min = ELEM(seq->type, SEQ_TYPE_SOUND_RAM, SEQ_TYPE_SOUND_HD) ? 0 : INT_MIN; | |||||
| *max = seq->len - seq->endofs - 1; | |||||
| } | |||||
| static void rna_Sequence_frame_offset_end_range( | |||||
| PointerRNA *ptr, int *min, int *max, int *UNUSED(softmin), int *UNUSED(softmax)) | |||||
| { | |||||
| Sequence *seq = (Sequence *)ptr->data; | |||||
| *min = ELEM(seq->type, SEQ_TYPE_SOUND_RAM, SEQ_TYPE_SOUND_HD) ? 0 : INT_MIN; | |||||
| *max = seq->len - seq->startofs - 1; | |||||
| } | |||||
| static void rna_Sequence_frame_length_set(PointerRNA *ptr, int value) | static void rna_Sequence_frame_length_set(PointerRNA *ptr, int value) | ||||
| { | { | ||||
| Sequence *seq = (Sequence *)ptr->data; | Sequence *seq = (Sequence *)ptr->data; | ||||
| Scene *scene = (Scene *)ptr->owner_id; | Scene *scene = (Scene *)ptr->owner_id; | ||||
| BKE_sequence_tx_set_final_right(seq, BKE_sequence_tx_get_final_left(seq, false) + value); | BKE_sequence_tx_set_final_right(seq, BKE_sequence_tx_get_final_left(seq, false) + value); | ||||
| do_sequence_frame_change_update(scene, seq); | do_sequence_frame_change_update(scene, seq); | ||||
| } | } | ||||
| Show All 24 Lines | static void rna_Sequence_channel_set(PointerRNA *ptr, int value) | ||||
| if (BKE_sequence_test_overlap(seqbase, seq)) { | if (BKE_sequence_test_overlap(seqbase, seq)) { | ||||
| /* XXX - BROKEN!, uses context seqbasep */ | /* XXX - BROKEN!, uses context seqbasep */ | ||||
| BKE_sequence_base_shuffle_ex(seqbase, seq, scene, channel_delta); | BKE_sequence_base_shuffle_ex(seqbase, seq, scene, channel_delta); | ||||
| } | } | ||||
| BKE_sequencer_sort(scene); | BKE_sequencer_sort(scene); | ||||
| } | } | ||||
| static void rna_Sequence_frame_offset_range( | |||||
| PointerRNA *ptr, int *min, int *max, int *UNUSED(softmin), int *UNUSED(softmax)) | |||||
| { | |||||
| Sequence *seq = (Sequence *)ptr->data; | |||||
| *min = ELEM(seq->type, SEQ_TYPE_SOUND_RAM, SEQ_TYPE_SOUND_HD) ? 0 : INT_MIN; | |||||
| *max = INT_MAX; | |||||
| } | |||||
| static void rna_Sequence_use_proxy_set(PointerRNA *ptr, bool value) | static void rna_Sequence_use_proxy_set(PointerRNA *ptr, bool value) | ||||
| { | { | ||||
| Sequence *seq = (Sequence *)ptr->data; | Sequence *seq = (Sequence *)ptr->data; | ||||
| BKE_sequencer_proxy_set(seq, value != 0); | BKE_sequencer_proxy_set(seq, value != 0); | ||||
| } | } | ||||
| static void rna_Sequence_use_translation_set(PointerRNA *ptr, bool value) | static void rna_Sequence_use_translation_set(PointerRNA *ptr, bool value) | ||||
| { | { | ||||
| ▲ Show 20 Lines • Show All 1,275 Lines • ▼ Show 20 Lines | static void rna_def_sequence(BlenderRNA *brna) | ||||
| RNA_def_property_editable_func(prop, "rna_Sequence_frame_editable"); | RNA_def_property_editable_func(prop, "rna_Sequence_frame_editable"); | ||||
| RNA_def_property_update( | RNA_def_property_update( | ||||
| prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_preprocessed_update"); | prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_preprocessed_update"); | ||||
| prop = RNA_def_property(srna, "frame_offset_start", PROP_INT, PROP_TIME); | prop = RNA_def_property(srna, "frame_offset_start", PROP_INT, PROP_TIME); | ||||
| RNA_def_property_int_sdna(prop, NULL, "startofs"); | RNA_def_property_int_sdna(prop, NULL, "startofs"); | ||||
| // RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* overlap tests */ | // RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* overlap tests */ | ||||
| RNA_def_property_ui_text(prop, "Start Offset", ""); | RNA_def_property_ui_text(prop, "Start Offset", ""); | ||||
| RNA_def_property_int_funcs(prop, NULL, NULL, "rna_Sequence_frame_offset_range"); | RNA_def_property_int_funcs(prop, NULL, NULL, "rna_Sequence_frame_offset_start_range"); | ||||
| RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_frame_change_update"); | RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_frame_change_update"); | ||||
| prop = RNA_def_property(srna, "frame_offset_end", PROP_INT, PROP_TIME); | prop = RNA_def_property(srna, "frame_offset_end", PROP_INT, PROP_TIME); | ||||
| RNA_def_property_int_sdna(prop, NULL, "endofs"); | RNA_def_property_int_sdna(prop, NULL, "endofs"); | ||||
| // RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* overlap tests */ | // RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* overlap tests */ | ||||
| RNA_def_property_ui_text(prop, "End Offset", ""); | RNA_def_property_ui_text(prop, "End Offset", ""); | ||||
| RNA_def_property_int_funcs(prop, NULL, NULL, "rna_Sequence_frame_offset_range"); | RNA_def_property_int_funcs(prop, NULL, NULL, "rna_Sequence_frame_offset_end_range"); | ||||
| RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_frame_change_update"); | RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_frame_change_update"); | ||||
| prop = RNA_def_property(srna, "frame_still_start", PROP_INT, PROP_TIME); | prop = RNA_def_property(srna, "frame_still_start", PROP_INT, PROP_TIME); | ||||
| RNA_def_property_int_sdna(prop, NULL, "startstill"); | RNA_def_property_int_sdna(prop, NULL, "startstill"); | ||||
| // RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* overlap tests */ | // RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* overlap tests */ | ||||
| RNA_def_property_range(prop, 0, MAXFRAME); | RNA_def_property_range(prop, 0, MAXFRAME); | ||||
| RNA_def_property_ui_text(prop, "Start Still", ""); | RNA_def_property_ui_text(prop, "Start Still", ""); | ||||
| RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_frame_change_update"); | RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_frame_change_update"); | ||||
| ▲ Show 20 Lines • Show All 362 Lines • ▼ Show 20 Lines | |||||
| static void rna_def_input(StructRNA *srna) | static void rna_def_input(StructRNA *srna) | ||||
| { | { | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| prop = RNA_def_property(srna, "animation_offset_start", PROP_INT, PROP_UNSIGNED); | prop = RNA_def_property(srna, "animation_offset_start", PROP_INT, PROP_UNSIGNED); | ||||
| RNA_def_property_int_sdna(prop, NULL, "anim_startofs"); | RNA_def_property_int_sdna(prop, NULL, "anim_startofs"); | ||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | ||||
| RNA_def_property_int_funcs( | RNA_def_property_int_funcs(prop, | ||||
| prop, NULL, "rna_Sequence_anim_startofs_final_set", NULL); /* overlap tests */ | NULL, | ||||
| "rna_Sequence_anim_startofs_final_set", | |||||
| "rna_Sequence_anim_startofs_final_range"); /* overlap tests */ | |||||
| RNA_def_property_ui_text(prop, "Animation Start Offset", "Animation start offset (trim start)"); | RNA_def_property_ui_text(prop, "Animation Start Offset", "Animation start offset (trim start)"); | ||||
| RNA_def_property_update( | RNA_def_property_update( | ||||
| prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_preprocessed_update"); | prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_preprocessed_update"); | ||||
| prop = RNA_def_property(srna, "animation_offset_end", PROP_INT, PROP_UNSIGNED); | prop = RNA_def_property(srna, "animation_offset_end", PROP_INT, PROP_UNSIGNED); | ||||
| RNA_def_property_int_sdna(prop, NULL, "anim_endofs"); | RNA_def_property_int_sdna(prop, NULL, "anim_endofs"); | ||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | ||||
| RNA_def_property_int_funcs( | RNA_def_property_int_funcs(prop, | ||||
| prop, NULL, "rna_Sequence_anim_endofs_final_set", NULL); /* overlap tests */ | NULL, | ||||
| "rna_Sequence_anim_endofs_final_set", | |||||
| "rna_Sequence_anim_endofs_final_range"); /* overlap tests */ | |||||
| RNA_def_property_ui_text(prop, "Animation End Offset", "Animation end offset (trim end)"); | RNA_def_property_ui_text(prop, "Animation End Offset", "Animation end offset (trim end)"); | ||||
| RNA_def_property_update( | RNA_def_property_update( | ||||
| prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_preprocessed_update"); | prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_preprocessed_update"); | ||||
| } | } | ||||
| static void rna_def_effect_inputs(StructRNA *srna, int count) | static void rna_def_effect_inputs(StructRNA *srna, int count) | ||||
| { | { | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| ▲ Show 20 Lines • Show All 1,097 Lines • Show Last 20 Lines | |||||