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:
authorRichard Antalik <richardantalik@gmail.com>2021-04-28 18:19:00 +0300
committerRichard Antalik <richardantalik@gmail.com>2021-04-28 18:19:44 +0300
commitc704ddcb5fb433405751437f5e4c952369423472 (patch)
tree27a21dee5389c068b6bac3f2cb7f2e19f418f26f /source/blender/depsgraph
parentd20f3992392a7fb308f85fd4a920aaf99230b227 (diff)
VSE: Fix slow prefetching when strips are animated
Issue was caused by anim handle being reset by `DEG_evaluate_on_framechange()` Preserve anim handle by backing it up in `blender::deg::SequenceBackup` Reviewed By: sergey Differential Revision: https://developer.blender.org/D11059
Diffstat (limited to 'source/blender/depsgraph')
-rw-r--r--source/blender/depsgraph/intern/eval/deg_eval_runtime_backup_sequence.cc6
-rw-r--r--source/blender/depsgraph/intern/eval/deg_eval_runtime_backup_sequence.h3
2 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/depsgraph/intern/eval/deg_eval_runtime_backup_sequence.cc b/source/blender/depsgraph/intern/eval/deg_eval_runtime_backup_sequence.cc
index 35720140f97..d481e0c39a8 100644
--- a/source/blender/depsgraph/intern/eval/deg_eval_runtime_backup_sequence.cc
+++ b/source/blender/depsgraph/intern/eval/deg_eval_runtime_backup_sequence.cc
@@ -35,24 +35,28 @@ SequenceBackup::SequenceBackup(const Depsgraph * /*depsgraph*/)
void SequenceBackup::reset()
{
scene_sound = nullptr;
+ BLI_listbase_clear(&anims);
}
void SequenceBackup::init_from_sequence(Sequence *sequence)
{
scene_sound = sequence->scene_sound;
+ anims = sequence->anims;
sequence->scene_sound = nullptr;
+ BLI_listbase_clear(&sequence->anims);
}
void SequenceBackup::restore_to_sequence(Sequence *sequence)
{
sequence->scene_sound = scene_sound;
+ sequence->anims = anims;
reset();
}
bool SequenceBackup::isEmpty() const
{
- return (scene_sound == nullptr);
+ return (scene_sound == nullptr) && BLI_listbase_is_empty(&anims);
}
} // namespace blender::deg
diff --git a/source/blender/depsgraph/intern/eval/deg_eval_runtime_backup_sequence.h b/source/blender/depsgraph/intern/eval/deg_eval_runtime_backup_sequence.h
index eb38dc3dc5b..3b3aa496496 100644
--- a/source/blender/depsgraph/intern/eval/deg_eval_runtime_backup_sequence.h
+++ b/source/blender/depsgraph/intern/eval/deg_eval_runtime_backup_sequence.h
@@ -23,6 +23,8 @@
#pragma once
+#include "BLI_listbase.h"
+
struct Sequence;
namespace blender {
@@ -43,6 +45,7 @@ class SequenceBackup {
bool isEmpty() const;
void *scene_sound;
+ ListBase anims;
};
} // namespace deg