diff options
author | Germano Cavalcante <mano-wii> | 2022-06-27 22:50:13 +0300 |
---|---|---|
committer | Germano Cavalcante <germano.costa@ig.com.br> | 2022-06-27 22:54:23 +0300 |
commit | 67e23b4b29676e7cbc039eba96e3edd78a632997 (patch) | |
tree | 2470da1ee0a27b261e7bf86c6b3f909544e9653b /source/blender/blenkernel/intern/pointcache.c | |
parent | a571c74e106bc864b84372d60a7504b730c801bd (diff) |
Fix T84369: Fluid: Missing cache invalidation when properties on non-domain objects change
The `DEG_OB_COMP_TRANSFORM` and `DEG_OB_COMP_GEOMETRY` relations between
the **Domain** object and the **Flow**, **Effector** and **Force Field** objects
are added in the `updateDepsgraph` callback of the Fluid modifier, more
specifically in `DEG_add_collision_relations`.
The node linked to these components is the `POINT_CACHE` whose assigned
function is `BKE_ptcache_object_reset`.
So include the `eModifierType_Fluid` modifier in outdated cache checks.
Reviewed By: sergey, zeddb
Maniphest Tasks: T84369
Differential Revision: https://developer.blender.org/D15210
Diffstat (limited to 'source/blender/blenkernel/intern/pointcache.c')
-rw-r--r-- | source/blender/blenkernel/intern/pointcache.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c index d7bdfe08ab9..21217a7f9bf 100644 --- a/source/blender/blenkernel/intern/pointcache.c +++ b/source/blender/blenkernel/intern/pointcache.c @@ -2980,6 +2980,15 @@ int BKE_ptcache_object_reset(Scene *scene, Object *ob, int mode) } } } + if (md->type == eModifierType_Fluid) { + FluidModifierData *fmd = (FluidModifierData *)md; + FluidDomainSettings *fds = fmd->domain; + if ((fmd->type & MOD_FLUID_TYPE_DOMAIN) && fds && + fds->cache_type == FLUID_DOMAIN_CACHE_REPLAY) { + BKE_ptcache_id_from_smoke(&pid, ob, fmd); + reset |= BKE_ptcache_id_reset(scene, &pid, mode); + } + } } if (scene->rigidbody_world && (ob->rigidbody_object || ob->rigidbody_constraint)) { |