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)!
This commit is contained in:
@@ -1919,9 +1919,12 @@ static int sequencer_separate_images_exec(bContext *C, wmOperator *op)
|
|||||||
strip_new = seq_new->strip;
|
strip_new = seq_new->strip;
|
||||||
strip_new->us = 1;
|
strip_new->us = 1;
|
||||||
|
|
||||||
/* new stripdata */
|
/* new stripdata (only one element now!) */
|
||||||
se_new = strip_new->stripdata;
|
/* 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));
|
BLI_strncpy(se_new->name, se->name, sizeof(se_new->name));
|
||||||
|
strip_new->stripdata = se_new;
|
||||||
|
|
||||||
BKE_sequence_calc(scene, seq_new);
|
BKE_sequence_calc(scene, seq_new);
|
||||||
|
|
||||||
if (step > 1) {
|
if (step > 1) {
|
||||||
|
|||||||
Reference in New Issue
Block a user