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-17 13:18:52 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-01-17 13:23:16 +0300
commitf314d9ce474924a972b89fba4c8a6ba1c0aeb4b3 (patch)
treebe5a6d75a2e4181b9f96c46a2e5f4bb2a10c8837 /source/blender/depsgraph/intern/depsgraph_tag.cc
parent10ce5af2ddf2b06865dcf317fce264be615509e8 (diff)
Depsgrapph: Fix/workaround for missing hair
The issue was happening because dependency graph did not inform particle settings as modified. This is a regression caused by tagging and flushing mechanism refactor. The real fix would be to make particle settings to use ID level recalc flags rather than own flags, which will also simplify relations around particle system, and particle settings evaluation. Reported by Mai in IRC.
Diffstat (limited to 'source/blender/depsgraph/intern/depsgraph_tag.cc')
-rw-r--r--source/blender/depsgraph/intern/depsgraph_tag.cc19
1 files changed, 18 insertions, 1 deletions
diff --git a/source/blender/depsgraph/intern/depsgraph_tag.cc b/source/blender/depsgraph/intern/depsgraph_tag.cc
index b2e32b766e7..f364ac52b38 100644
--- a/source/blender/depsgraph/intern/depsgraph_tag.cc
+++ b/source/blender/depsgraph/intern/depsgraph_tag.cc
@@ -189,7 +189,24 @@ void depsgraph_tag_to_component_opcode(const ID *id,
case DEG_TAG_PSYS_TYPE:
case DEG_TAG_PSYS_CHILD:
case DEG_TAG_PSYS_PHYS:
- *component_type = DEG_NODE_TYPE_EVAL_PARTICLES;
+ if (id_type == ID_PA) {
+ /* NOTES:
+ * - For particle settings node we need to use different
+ * component. Will be nice to get this unified with object,
+ * but we can survive for now with single exception here.
+ * Particles needs reconsideration anyway,
+ * - We do direct injection of particle settings recalc flag
+ * here. This is what we need to do for until particles
+ * are switched away from own recalc flag and are using
+ * ID->recalc flags instead.
+ */
+ ParticleSettings *particle_settings = (ParticleSettings *)id;
+ particle_settings->recalc |= (tag & DEG_TAG_PSYS_ALL);
+ *component_type = DEG_NODE_TYPE_PARAMETERS;
+ }
+ else {
+ *component_type = DEG_NODE_TYPE_EVAL_PARTICLES;
+ }
break;
case DEG_TAG_COPY_ON_WRITE:
*component_type = DEG_NODE_TYPE_COPY_ON_WRITE;