diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-12-10 19:37:30 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-12-10 19:37:30 +0300 |
commit | f179ac9fc163b1f94efe7079357a31beb9fcd544 (patch) | |
tree | 70da479178c19483213acd76402a03dc7bb96f9b /source/blender/depsgraph | |
parent | 9fa408f51b70169d4e1ecf0801a3b9f726a9530b (diff) |
Fix T58932: Impossible to influence the particle system
Diffstat (limited to 'source/blender/depsgraph')
-rw-r--r-- | source/blender/depsgraph/intern/builder/deg_builder_relations.cc | 6 | ||||
-rw-r--r-- | source/blender/depsgraph/intern/eval/deg_eval_flush.cc | 19 |
2 files changed, 15 insertions, 10 deletions
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. |