Commit: f179ac9fc163b1f94efe7079357a31beb9fcd544
Author: Sergey Sharybin
Date:   Mon Dec 10 17:37:30 2018 +0100
Branches: blender2.8
https://developer.blender.org/rBf179ac9fc163b1f94efe7079357a31beb9fcd544

Fix T58932: Impossible to influence the particle system

===================================================================

M       source/blender/depsgraph/intern/builder/deg_builder_relations.cc
M       source/blender/depsgraph/intern/eval/deg_eval_flush.cc

===================================================================

diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc 
b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
index 1d5ff8cd3e5..81b9b32c696 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
@@ -1847,6 +1847,12 @@ void 
DepsgraphRelationBuilder::build_particle_settings(ParticleSettings *part)
                             "Particle Texture",
                             DEPSREL_FLAG_FLUSH_USER_EDIT_ONLY);
        }
+       if (check_id_has_anim_component(&part->id)) {
+               ComponentKey animation_key(&part->id, DEG_NODE_TYPE_ANIMATION);
+               add_relation(animation_key,
+                            particle_settings_eval_key,
+                            "Particle Settings Animation");
+       }
 }
 
 void DepsgraphRelationBuilder::build_particle_system_visualization_object(
diff --git a/source/blender/depsgraph/intern/eval/deg_eval_flush.cc 
b/source/blender/depsgraph/intern/eval/deg_eval_flush.cc
index fef3282cfcc..5373c142ba6 100644
--- a/source/blender/depsgraph/intern/eval/deg_eval_flush.cc
+++ b/source/blender/depsgraph/intern/eval/deg_eval_flush.cc
@@ -164,17 +164,16 @@ BLI_INLINE void flush_handle_component_node(IDDepsNode 
*id_node,
                return;
        }
        comp_node->custom_flags = COMPONENT_STATE_DONE;
-       /* Tag all required operations in component for update.  */
-       foreach (OperationDepsNode *op, comp_node->operations) {
-               /* We don't want to flush tags in "upstream" direction for
-                * certain types of operations.
-                *
-                * TODO(sergey): Need a more generic solution for this.
-                */
-               if (op->opcode == DEG_OPCODE_PARTICLE_SETTINGS_EVAL) {
-                       continue;
+       /* Tag all required operations in component for update, unless this is a
+        * special component where we don't want all operations to be tagged.
+        *
+        * TODO(sergey): Make this a more generic solution. */
+       if (comp_node->type != DEG_NODE_TYPE_PARTICLE_SETTINGS &&
+           comp_node->type != DEG_NODE_TYPE_PARTICLE_SYSTEM)
+       {
+               foreach (OperationDepsNode *op, comp_node->operations) {
+                       op->flag |= DEPSOP_FLAG_NEEDS_UPDATE;
                }
-               op->flag |= DEPSOP_FLAG_NEEDS_UPDATE;
        }
        /* when some target changes bone, we might need to re-run the
         * whole IK solver, otherwise result might be unpredictable.

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to