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:
authorPeter Schlaile <peter@schlaile.de>2010-07-04 01:13:08 +0400
committerPeter Schlaile <peter@schlaile.de>2010-07-04 01:13:08 +0400
commit6e5a436f56a6d7e69a61393d3a34940aecbf8a92 (patch)
tree490bbc7a1a7274b33d779552fec30215bccda72f /source/blender/blenkernel/intern
parentc9627f7883934a6b6a935dfefa964728d083c338 (diff)
== 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.
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r--source/blender/blenkernel/intern/sequencer.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c
index ddbe748ede9..baeff5a838b 100644
--- a/source/blender/blenkernel/intern/sequencer.c
+++ b/source/blender/blenkernel/intern/sequencer.c
@@ -213,6 +213,8 @@ void seq_free_strip(Strip *strip)
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 @@ void seq_free_sequence(Scene *scene, Sequence *seq)
sound_remove_scene_sound(scene, seq->scene_sound);
}
+ seq_free_animdata(scene, seq);
+
MEM_freeN(seq);
}
@@ -3842,6 +3846,33 @@ void seq_offset_animdata(Scene *scene, Sequence *seq, int ofs)
}
}
+/* 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)
{