diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-07-18 17:34:33 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-07-19 16:20:06 +0300 |
commit | 17cd9f8df4c4dc8d95e31665d28aebd2f45fd2b4 (patch) | |
tree | d6bc8b179468d9c460a94b05a43f907af4772b05 /source/blender | |
parent | c3f64ea009f9783faee174e5a43a02ace514bcab (diff) |
Depsgraph: Prevent wrong particles state when canceling playback
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/particle_system.c | 1 | ||||
-rw-r--r-- | source/blender/depsgraph/intern/eval/deg_eval_flush.cc | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index 389a98e2573..6fb3bdf325d 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -4359,6 +4359,7 @@ void BKE_particle_system_settings_eval(struct EvaluationContext *UNUSED(eval_ctx if (G.debug & G_DEBUG_DEPSGRAPH) { printf("%s on %s (%p)\n", __func__, psys->name, psys); } + /* TODO(sergey): Need to do something more granular here. */ psys->recalc |= PSYS_RECALC; } diff --git a/source/blender/depsgraph/intern/eval/deg_eval_flush.cc b/source/blender/depsgraph/intern/eval/deg_eval_flush.cc index 8c79c611fe0..3717e62ef7e 100644 --- a/source/blender/depsgraph/intern/eval/deg_eval_flush.cc +++ b/source/blender/depsgraph/intern/eval/deg_eval_flush.cc @@ -152,6 +152,14 @@ void deg_graph_flush_updates(Main *bmain, Depsgraph *graph) } } 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; + } op->flag |= DEPSOP_FLAG_NEEDS_UPDATE; } if (object != NULL) { |