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:
authorBastien Montagne <b.mont29@gmail.com>2020-03-17 14:09:06 +0300
committerBastien Montagne <b.mont29@gmail.com>2020-03-17 14:10:52 +0300
commitb02a25b7e10e5713052f5a6ccf4127ad4d995f25 (patch)
tree6cc49eb98bba6d624c0cbf2ee61bd3a755df41a1 /source/blender/makesdna
parent055863d9c1f0195765f421b1f87e445dd070ea00 (diff)
Add accumulated recalc flags to IDs.
Those accumulated flags get cleared every time an undo step is written to memfile. Preliminary work for undo-speedup. Part of T60695/D6580.
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_ID.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h
index 40916cbdc61..f2923c7f144 100644
--- a/source/blender/makesdna/DNA_ID.h
+++ b/source/blender/makesdna/DNA_ID.h
@@ -245,6 +245,12 @@ typedef struct ID {
int us;
int icon_id;
int recalc;
+ /**
+ * Used by undo code. Value of recalc is stored there when reading an ID from memfile, and not
+ * touched by anything, which means it can be used as 'reference' recalc value for the next undo
+ * step, when going backward (i.e. actual undo, redo can just use recalc value directly).
+ */
+ int recalc_undo_accumulated;
/**
* A session-wide unique identifier for a given ID, that remain the same across potential
@@ -252,6 +258,8 @@ typedef struct ID {
*/
unsigned int session_uuid;
+ char _pad[4];
+
IDProperty *properties;
/** Reference linked ID which this one overrides. */