Depsgraph: Prevent wrong particles state when canceling playback

This commit is contained in:
Sergey Sharybin 2017-07-18 16:34:33 +02:00
parent c3f64ea009
commit 17cd9f8df4
2 changed files with 9 additions and 0 deletions

View File

@ -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;
}

View File

@ -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) {