diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-04-17 13:47:28 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-04-17 13:47:28 +0300 |
commit | 17041bd895eadca1bff3bf88bc8b0f9982fe4573 (patch) | |
tree | 72ef6bdfd9a7f801e97206ca16abe8ed20fcc1c7 /source | |
parent | 2408a482c032e4df9c091f9fa854785bb08963b3 (diff) |
Depsgraph: Fix unwanted node tree copy-over
Was caused by two things from the past:
- Tagging would set id->recalc to COW update flag.
This one is to be ignored.
- Particle tagging will use psys recalc flags on id->recalc,
but we only need to use flags from particles. Otherwise
it will be some collisions in bit masks.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/depsgraph/intern/depsgraph_tag.cc | 2 | ||||
-rw-r--r-- | source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc | 4 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_ID.h | 1 |
3 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/depsgraph/intern/depsgraph_tag.cc b/source/blender/depsgraph/intern/depsgraph_tag.cc index 6a6ebd1be44..bf5d594f97e 100644 --- a/source/blender/depsgraph/intern/depsgraph_tag.cc +++ b/source/blender/depsgraph/intern/depsgraph_tag.cc @@ -410,7 +410,7 @@ void deg_graph_id_tag_update(Main *bmain, Depsgraph *graph, ID *id, int flag) } deg_graph_id_tag_legacy_compat(bmain, id, (eDepsgraph_Tag)0); } - id->recalc |= flag; + id->recalc |= (flag & PSYS_RECALC); int current_flag = flag; while (current_flag != 0) { eDepsgraph_Tag tag = 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 91790522590..f6a37c49d32 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 @@ -649,7 +649,9 @@ ID *deg_update_copy_on_write_datablock(const Depsgraph *depsgraph, * everything is done by node tree update function which * only copies socket values. */ - const int ignore_flag = (ID_RECALC_DRAW | ID_RECALC_ANIMATION); + const int ignore_flag = (ID_RECALC_DRAW | + ID_RECALC_ANIMATION | + ID_RECALC_COPY_ON_WRITE); if ((id_cow->recalc & ~ignore_flag) == 0) { return id_cow; } diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h index 778aaec7d19..ba4b0970313 100644 --- a/source/blender/makesdna/DNA_ID.h +++ b/source/blender/makesdna/DNA_ID.h @@ -460,6 +460,7 @@ enum { LIB_TAG_NOT_ALLOCATED = 1 << 16, }; +/* WARNING - when adding flags check on PSYS_RECALC */ enum { /* RESET_AFTER_USE, used by update code (depsgraph). */ ID_RECALC_NONE = 0, |