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
path: root/source
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2019-05-02 11:17:25 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2019-05-03 16:50:40 +0300
commit4eedf784b0421727bc1ef2bdf3b65294eedea050 (patch)
tree32c433631a301e52f02f4dbbd8283ff1cae9abb6 /source
parent6990ef151c199761da1eb1777ff384835bb7ba20 (diff)
Depsgraph: Store original sequencer strip pointer
Allows to identify where the strip came from.
Diffstat (limited to 'source')
-rw-r--r--source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc21
-rw-r--r--source/blender/makesdna/DNA_sequence_types.h3
2 files changed, 24 insertions, 0 deletions
diff --git a/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc b/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc
index 2a76d5cd362..b73c525ca13 100644
--- a/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc
+++ b/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc
@@ -59,6 +59,7 @@ extern "C" {
#include "DNA_mesh_types.h"
#include "DNA_modifier_types.h"
#include "DNA_scene_types.h"
+#include "DNA_sequence_types.h"
#include "DNA_object_types.h"
#include "DNA_particle_types.h"
@@ -424,6 +425,25 @@ void scene_setup_view_layers_after_remap(const Depsgraph *depsgraph,
* Still not an excuse to have those. */
}
+void update_sequence_orig_pointers(const ListBase *sequences_orig, ListBase *sequences_cow)
+{
+ Sequence *sequence_orig = reinterpret_cast<Sequence *>(sequences_orig->first);
+ Sequence *sequence_cow = reinterpret_cast<Sequence *>(sequences_cow->first);
+ while (sequence_orig != NULL) {
+ update_sequence_orig_pointers(&sequence_orig->seqbase, &sequence_cow->seqbase);
+ sequence_cow->orig_sequence = sequence_orig;
+ sequence_cow = sequence_cow->next;
+ sequence_orig = sequence_orig->next;
+ }
+}
+
+void update_scene_orig_pointers(const Scene *scene_orig, Scene *scene_cow)
+{
+ if (scene_orig->ed != NULL) {
+ update_sequence_orig_pointers(&scene_orig->ed->seqbase, &scene_cow->ed->seqbase);
+ }
+}
+
/* Check whether given ID is expanded or still a shallow copy. */
BLI_INLINE bool check_datablock_expanded(const ID *id_cow)
{
@@ -708,6 +728,7 @@ void update_id_after_copy(const Depsgraph *depsgraph,
scene_cow->toolsettings = scene_orig->toolsettings;
scene_cow->eevee.light_cache = scene_orig->eevee.light_cache;
scene_setup_view_layers_after_remap(depsgraph, id_node, reinterpret_cast<Scene *>(id_cow));
+ update_scene_orig_pointers(scene_orig, scene_cow);
break;
}
default:
diff --git a/source/blender/makesdna/DNA_sequence_types.h b/source/blender/makesdna/DNA_sequence_types.h
index c21fa2ba64e..5240de4aff9 100644
--- a/source/blender/makesdna/DNA_sequence_types.h
+++ b/source/blender/makesdna/DNA_sequence_types.h
@@ -232,6 +232,9 @@ typedef struct Sequence {
int cache_flag;
int _pad2[3];
+
+ struct Sequence *orig_sequence;
+ void *_pad3;
} Sequence;
typedef struct MetaStack {