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>2017-12-15 11:43:18 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-12-15 11:43:18 +0300
commitc4046e9082f61bfef87173d20c566a065f2602d7 (patch)
treed04eb7411cb107ed05c3e6e9a83a54065b4a46a4 /source/blender/blenkernel/intern/anim_sys.c
parent400d59be9b058d4bfa31a84547591275f7c700b9 (diff)
Move ID recalc flags into dedicated field in ID
Currently this is a no-visible-changes change, but the idea is to use this dedicated flag to tell which exact components of ID changed, make it more granular than just OBJECT and OBJECT_DATA. Allow setting this field based on what components new dependency graph flushed on evaluation.
Diffstat (limited to 'source/blender/blenkernel/intern/anim_sys.c')
-rw-r--r--source/blender/blenkernel/intern/anim_sys.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c
index 6107bb1e32e..ba8f454aa47 100644
--- a/source/blender/blenkernel/intern/anim_sys.c
+++ b/source/blender/blenkernel/intern/anim_sys.c
@@ -74,6 +74,8 @@
#include "nla_private.h"
+#include "atomic_ops.h"
+
/* ***************************************** */
/* AnimData API */
@@ -1663,8 +1665,11 @@ static bool animsys_write_rna_setting(PathResolvedRNA *anim_rna, const float val
/* for cases like duplifarmes it's only a temporary so don't
* notify anyone of updates */
- if (!(id->tag & LIB_TAG_ANIM_NO_RECALC)) {
- BKE_id_tag_set_atomic(id, LIB_TAG_ID_RECALC);
+ if (!(id->recalc & ID_RECALC_SKIP_ANIM_TAG)) {
+ /* NOTE: This is a bit annoying to use atomic API here, but this
+ * code is at it's EOL and removed already in 2.8 branch.
+ */
+ atomic_fetch_and_or_int32(&id->recalc, ID_RECALC);
DAG_id_type_tag(G.main, GS(id->name));
}
}
@@ -2618,8 +2623,8 @@ static void animsys_evaluate_nla(ListBase *echannels, PointerRNA *ptr, AnimData
*/
if (ptr->id.data != NULL) {
ID *id = ptr->id.data;
- if (!(id->tag & LIB_TAG_ANIM_NO_RECALC)) {
- id->tag |= LIB_TAG_ID_RECALC;
+ if (!(id->recalc & ID_RECALC_SKIP_ANIM_TAG)) {
+ id->recalc |= ID_RECALC;
DAG_id_type_tag(G.main, GS(id->name));
}
}