diff options
Diffstat (limited to 'source/blender/makesrna/intern/rna_sequencer.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_sequencer.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c index f3b158f84fe..4db23443895 100644 --- a/source/blender/makesrna/intern/rna_sequencer.c +++ b/source/blender/makesrna/intern/rna_sequencer.c @@ -191,6 +191,13 @@ static int rna_Sequence_frame_length_get(PointerRNA *ptr) return seq_tx_get_final_right(seq, 0)-seq_tx_get_final_left(seq, 0); } +static int rna_Sequence_frame_editable(PointerRNA *ptr) +{ + Sequence *seq = (Sequence*)ptr->data; + /* Effect sequences' start frame and length must be readonly! */ + return (get_sequence_effect_num_inputs(seq->type))? 0: PROP_EDITABLE; +} + static void rna_Sequence_channel_set(PointerRNA *ptr, int value) { Sequence *seq= (Sequence*)ptr->data; @@ -1025,8 +1032,9 @@ static void rna_def_sequence(BlenderRNA *brna) prop= RNA_def_property(srna, "frame_final_duration", PROP_INT, PROP_TIME); RNA_def_property_range(prop, 1, MAXFRAME); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); - RNA_def_property_ui_text(prop, "Length", "The length of the contents of this strip before the handles are applied"); + RNA_def_property_ui_text(prop, "Length", "The length of the contents of this strip after the handles are applied"); RNA_def_property_int_funcs(prop, "rna_Sequence_frame_length_get", "rna_Sequence_frame_length_set",NULL); + RNA_def_property_editable_func(prop, "rna_Sequence_frame_editable"); RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); prop= RNA_def_property(srna, "frame_duration", PROP_INT, PROP_TIME); @@ -1040,6 +1048,7 @@ static void rna_def_sequence(BlenderRNA *brna) RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_ui_text(prop, "Start Frame", ""); RNA_def_property_int_funcs(prop, NULL, "rna_Sequence_start_frame_set",NULL); // overlap tests and calc_seq_disp + RNA_def_property_editable_func(prop, "rna_Sequence_frame_editable"); RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); prop= RNA_def_property(srna, "frame_final_start", PROP_INT, PROP_TIME); @@ -1047,6 +1056,7 @@ static void rna_def_sequence(BlenderRNA *brna) RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_ui_text(prop, "Start Frame", "Start frame displayed in the sequence editor after offsets are applied, setting this is equivalent to moving the handle, not the actual start frame"); RNA_def_property_int_funcs(prop, NULL, "rna_Sequence_start_frame_final_set", NULL); // overlap tests and calc_seq_disp + RNA_def_property_editable_func(prop, "rna_Sequence_frame_editable"); RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); prop= RNA_def_property(srna, "frame_final_end", PROP_INT, PROP_TIME); @@ -1054,6 +1064,7 @@ static void rna_def_sequence(BlenderRNA *brna) RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_ui_text(prop, "End Frame", "End frame displayed in the sequence editor after offsets are applied"); RNA_def_property_int_funcs(prop, NULL, "rna_Sequence_end_frame_final_set", NULL); // overlap tests and calc_seq_disp + RNA_def_property_editable_func(prop, "rna_Sequence_frame_editable"); RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); prop= RNA_def_property(srna, "frame_offset_start", PROP_INT, PROP_TIME); |