Commit: 2e436173aae1ff715eb1d19aebbf7243ba4afc5c
Author: Bastien Montagne
Date:   Mon Jul 21 22:55:06 2014 +0200
Branches: master
https://developer.blender.org/rB2e436173aae1ff715eb1d19aebbf7243ba4afc5c

Fix T41086: VSE separate images increases file size abnormally.

We were copying everything from the old sequence into each new ones... 
including the stripdata,
which for image sequences is an array with one item per image!

So bug was an exponential one, separating strips of a few tens of images was 
insensible, while
separating a strip of 1000 images would add above 250MB to file size (and RAM 
usage too)!

===================================================================

M       source/blender/editors/space_sequencer/sequencer_edit.c

===================================================================

diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c 
b/source/blender/editors/space_sequencer/sequencer_edit.c
index 973d6a9..dcf13db 100644
--- a/source/blender/editors/space_sequencer/sequencer_edit.c
+++ b/source/blender/editors/space_sequencer/sequencer_edit.c
@@ -1919,9 +1919,12 @@ static int sequencer_separate_images_exec(bContext *C, 
wmOperator *op)
                                strip_new = seq_new->strip;
                                strip_new->us = 1;
 
-                               /* new stripdata */
-                               se_new = strip_new->stripdata;
+                               /* new stripdata (only one element now!) */
+                               /* Note this assume all elements (images) have 
the same dimension, since we only copy the name here. */
+                               se_new = MEM_reallocN(strip_new->stripdata, 
sizeof(*se_new));
                                BLI_strncpy(se_new->name, se->name, 
sizeof(se_new->name));
+                               strip_new->stripdata = se_new;
+
                                BKE_sequence_calc(scene, seq_new);
 
                                if (step > 1) {

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to