Revision: 29909 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=29909 Author: schlaile Date: 2010-07-03 23:13:08 +0200 (Sat, 03 Jul 2010)
Log Message: ----------- == Sequencer == This fixes: [#22722] Removing a sequence strip doesnt remove assosiated fcurves by using the same hack that is used for moving curve-data along with the strips on grab. Should be cleaned up (both functions!) by making sequencer-strips finally true IDs. Until that happens, there is only an more or less ugly way of doing that. Modified Paths: -------------- trunk/blender/source/blender/blenkernel/intern/sequencer.c Modified: trunk/blender/source/blender/blenkernel/intern/sequencer.c =================================================================== --- trunk/blender/source/blender/blenkernel/intern/sequencer.c 2010-07-03 20:47:03 UTC (rev 29908) +++ trunk/blender/source/blender/blenkernel/intern/sequencer.c 2010-07-03 21:13:08 UTC (rev 29909) @@ -213,6 +213,8 @@ MEM_freeN(strip); } +static void seq_free_animdata(Scene *scene, Sequence *seq); + void seq_free_sequence(Scene *scene, Sequence *seq) { if(seq->strip) seq_free_strip(seq->strip); @@ -236,6 +238,8 @@ sound_remove_scene_sound(scene, seq->scene_sound); } + seq_free_animdata(scene, seq); + MEM_freeN(seq); } @@ -3842,7 +3846,34 @@ } } +/* XXX - hackish function needed to remove all fcurves belonging to a sequencer strip */ +static void seq_free_animdata(Scene *scene, Sequence *seq) +{ + char str[32]; + FCurve *fcu; + if(scene->adt==NULL || scene->adt->action==NULL) + return; + + sprintf(str, "[\"%s\"]", seq->name+2); + + fcu= scene->adt->action->curves.first; + + while (fcu) { + if(strstr(fcu->rna_path, "sequence_editor.sequences_all[") && strstr(fcu->rna_path, str)) { + FCurve *next_fcu = fcu->next; + + BLI_remlink(&scene->adt->action->curves, fcu); + free_fcurve(fcu); + + fcu = next_fcu; + } else { + fcu = fcu->next; + } + } +} + + Sequence *get_seq_by_name(ListBase *seqbase, const char *name, int recursive) { Sequence *iseq=NULL; _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs