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:
authorSergey Sharybin <sergey.vfx@gmail.com>2018-01-16 16:57:02 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-01-16 17:09:48 +0300
commit263f61493286cbcfb8ee6b86979d50794e358128 (patch)
treef6a51eb31cdab023851530fb862bca4481565bd2 /source/blender/makesdna/DNA_ID.h
parentd4ff1a1f2c57cbe05aedf5fd19219323b94466ab (diff)
Add dedicated pointer to an original ID datablock
Before we were re-using newid pointer inside of ID structure where we were storing pointer to an original datablock. It seems there is no way we can avoid requirement of having pointer to an original datablock, so let's stop obusing system which was only designed to be a runtime only thingie. Will be more safe this way, without need to worry about using any API which modifies newid.
Diffstat (limited to 'source/blender/makesdna/DNA_ID.h')
-rw-r--r--source/blender/makesdna/DNA_ID.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h
index 04929931bfd..fd8cd8b2855 100644
--- a/source/blender/makesdna/DNA_ID.h
+++ b/source/blender/makesdna/DNA_ID.h
@@ -216,7 +216,11 @@ typedef struct ID {
IDProperty *properties;
IDOverrideStatic *override_static; /* Reference linked ID which this one overrides. */
- void *pad1;
+
+ /* Only set for datablocks which are coming from copy-on-write, points to
+ * the original version of it.
+ */
+ void *orig_id;
void *py_instance;
} ID;