diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-12-19 17:36:09 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-12-19 17:36:09 +0300 |
commit | 4563849c1b3ca6eb7418ea2870f35a624ec04f81 (patch) | |
tree | 46ff162d9c06ca41025b51de3e756c8877e0f9cc /source/blender/depsgraph | |
parent | 259879e135476da6255d1411d66089ccdc78ad9d (diff) |
Fixes for particle system and physics
- Silence harmless error print about relation.
Object with particle system which doesn't use physics will
not have point cache component.
- Tag relations for update when particle system physics type
change.
This ensures correct state of point cache component.
This is all part of T59258.
Diffstat (limited to 'source/blender/depsgraph')
-rw-r--r-- | source/blender/depsgraph/intern/builder/deg_builder_relations.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc index 23328721e2c..c8822df28e6 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc @@ -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; |