[Bf-blender-cvs] [17cd9f8df4c] blender2.8: Depsgraph: Prevent wrong particles state when canceling playback
Sergey Sharybin
noreply at git.blender.org
Wed Jul 19 17:33:52 CEST 2017
Commit: 17cd9f8df4c4dc8d95e31665d28aebd2f45fd2b4
Author: Sergey Sharybin
Date: Tue Jul 18 16:34:33 2017 +0200
Branches: blender2.8
https://developer.blender.org/rB17cd9f8df4c4dc8d95e31665d28aebd2f45fd2b4
Depsgraph: Prevent wrong particles state when canceling playback
===================================================================
M source/blender/blenkernel/intern/particle_system.c
M source/blender/depsgraph/intern/eval/deg_eval_flush.cc
===================================================================
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) {
More information about the Bf-blender-cvs
mailing list