Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-11-17 09:33:02 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-11-17 09:33:02 +0400
commitdfeda8688efbf2cdcbd81baa0621f6c075ac582b (patch)
treec023614805552287a5e1c14bcd801e03bf6ac7a1 /source/blender/makesrna
parent1038c76c551be5f8d4b083f05fd2ed06f16c767a (diff)
parent1cfbde0eb469f7d827b73667d7406eddc0065ceb (diff)
svn merge ^/trunk/blender -r41932:41939
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_sequencer.c13
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);