Revision: 28268 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=28268 Author: schlaile Date: 2010-04-18 20:30:55 +0200 (Sun, 18 Apr 2010)
Log Message: ----------- Brought back editable anim_startofs and anim_endofs both with shuffle test Modified Paths: -------------- trunk/blender/source/blender/makesrna/intern/rna_sequencer.c Modified: trunk/blender/source/blender/makesrna/intern/rna_sequencer.c =================================================================== --- trunk/blender/source/blender/makesrna/intern/rna_sequencer.c 2010-04-18 17:26:37 UTC (rev 28267) +++ trunk/blender/source/blender/makesrna/intern/rna_sequencer.c 2010-04-18 18:30:55 UTC (rev 28268) @@ -130,6 +130,28 @@ 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 @@ 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"); } _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs