Depsgraph: Add missing checks from previous commit

This commit is contained in:
Sergey Sharybin 2017-11-17 15:27:02 +01:00
parent c45afcfa81
commit 9c0a38ee33
Notes: blender-bot 2023-05-29 09:17:12 +02:00
Referenced by issue #53683, 2.79a release
1 changed files with 5 additions and 6 deletions

View File

@ -190,7 +190,7 @@ static bool particle_system_depends_on_time(ParticleSystem *psys)
return false;
}
static bool object_particles_depends_oin_time(Object *object)
static bool object_particles_depends_on_time(Object *object)
{
LINKLIST_FOREACH (ParticleSystem *, psys, &object->particlesystem) {
if (particle_system_depends_on_time(psys)) {
@ -1354,10 +1354,9 @@ void DepsgraphRelationBuilder::build_particles(Object *ob)
OperationKey eval_init_key(&ob->id,
DEG_NODE_TYPE_EVAL_PARTICLES,
DEG_OPCODE_PARTICLE_SYSTEM_EVAL_INIT);
/* TODO(sergey): Are all particle systems depends on time?
* Hair without dynamics i.e.
*/
add_relation(time_src_key, eval_init_key, "TimeSrc -> PSys");
if (object_particles_depends_on_time(ob)) {
add_relation(time_src_key, eval_init_key, "TimeSrc -> PSys");
}
/* particle systems */
LINKLIST_FOREACH (ParticleSystem *, psys, &ob->particlesystem) {
@ -1587,7 +1586,7 @@ void DepsgraphRelationBuilder::build_obdata_geom(Object *ob)
*
* Ideally we need to get rid of this relation.
*/
if (object_particles_depends_oin_time(ob)) {
if (object_particles_depends_on_time(ob)) {
TimeSourceKey time_key;
OperationKey obdata_ubereval_key(&ob->id,
DEG_NODE_TYPE_GEOMETRY,