diff options
author | Peter Schlaile <peter@schlaile.de> | 2010-04-18 22:30:55 +0400 |
---|---|---|
committer | Peter Schlaile <peter@schlaile.de> | 2010-04-18 22:30:55 +0400 |
commit | 4d1903870af3985740ce8daa5ae91af20334c2a9 (patch) | |
tree | 068bc4725fac0b8444e240a557809e2389870bff /source/blender/makesrna | |
parent | f05a7e70b28b99a49b9ff6053052d086be0863cf (diff) |
Brought back editable anim_startofs and anim_endofs both with shuffle test
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_sequencer.c | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c index 2e199f7c895..8aee2b50b52 100644 --- a/source/blender/makesrna/intern/rna_sequencer.c +++ b/source/blender/makesrna/intern/rna_sequencer.c @@ -130,6 +130,28 @@ static void rna_Sequence_end_frame_final_set(PointerRNA *ptr, int value) rna_Sequence_frame_change_update(scene, seq); } +static void rna_Sequence_anim_startofs_final_set(PointerRNA *ptr, int value) +{ + Sequence *seq= (Sequence*)ptr->data; + Scene *scene= (Scene*)ptr->id.data; + + seq->anim_startofs = MIN2(value, seq->len + seq->anim_startofs); + + reload_sequence_new_file(scene, seq); + rna_Sequence_frame_change_update(scene, seq); +} + +static void rna_Sequence_anim_endofs_final_set(PointerRNA *ptr, int value) +{ + Sequence *seq= (Sequence*)ptr->data; + Scene *scene= (Scene*)ptr->id.data; + + seq->anim_endofs = MIN2(value, seq->len + seq->anim_endofs); + + reload_sequence_new_file(scene, seq); + rna_Sequence_frame_change_update(scene, seq); +} + static void rna_Sequence_length_set(PointerRNA *ptr, int value) { Sequence *seq= (Sequence*)ptr->data; @@ -887,13 +909,16 @@ static void rna_def_input(StructRNA *srna) prop= RNA_def_property(srna, "animation_start_offset", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "anim_startofs"); - RNA_def_property_clear_flag(prop, PROP_EDITABLE); // overlap test + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); + RNA_def_property_int_funcs(prop, NULL, "rna_Sequence_anim_startofs_final_set", NULL); // overlap tests + RNA_def_property_ui_text(prop, "Animation Start Offset", "Animation start offset (trim start)"); RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); prop= RNA_def_property(srna, "animation_end_offset", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "anim_endofs"); - RNA_def_property_clear_flag(prop, PROP_EDITABLE); // overlap test + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); + RNA_def_property_int_funcs(prop, NULL, "rna_Sequence_anim_endofs_final_set", NULL); // overlap tests RNA_def_property_ui_text(prop, "Animation End Offset", "Animation end offset (trim end)"); RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); } |