Fixes for particle system and physics
[blender.git] / source / blender / depsgraph / intern / builder / deg_builder_relations.cc
index 23328721e2cf358eaf21e774c89c752db2ff1295..c8822df28e6188084e10d2da2c6c3fd3d7fab303 100644 (file)
@@ -1714,8 +1714,10 @@ void DepsgraphRelationBuilder::build_particle_systems(Object *object)
                                   DEG_NODE_TYPE_PARTICLE_SYSTEM,
                                   DEG_OPCODE_PARTICLE_SYSTEM_DONE);
        ComponentKey eval_key(&object->id, DEG_NODE_TYPE_PARTICLE_SYSTEM);
-       ComponentKey point_cache_key(&object->id, DEG_NODE_TYPE_POINT_CACHE);
-       add_relation(eval_key, point_cache_key, "Particle Point Cache");
+       if (BKE_ptcache_object_has(scene_, object, 0)) {
+               ComponentKey point_cache_key(&object->id, DEG_NODE_TYPE_POINT_CACHE);
+               add_relation(eval_key, point_cache_key, "Particle Point Cache");
+       }
        /* Particle systems. */
        LISTBASE_FOREACH (ParticleSystem *, psys, &object->particlesystem) {
                ParticleSettings *part = psys->part;