Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGermano Cavalcante <mano-wii>2022-11-09 18:09:55 +0300
committerGermano Cavalcante <germano.costa@ig.com.br>2022-11-09 18:13:51 +0300
commit77bc95bbd531712793f4e355132724c639bf7a99 (patch)
treea896b671bc9ce1794bab2ffe93bceff4f90b74ca
parentc26d49e854b345094828ecf908e050a4d9c637cf (diff)
Fix T102257: Crash when making an Object as Effector set to Guide and trying to scrub the timeline
rB67e23b4b2967 revealed the bug. But the bug already existed before, it just wasn't triggered. Apparently the problem happens because the python code generated in `initGuiding()` cannot be executed twice. The second time the `initGuiding()` code is executed, the local python variables are removed to make way for the others, but the reference to one of the grids in a `Solver` object (name='solver_guiding2') is still being used somewhere. So an error is raised and a crash is forced. The solution is to prevent the python code in `initGuiding()` from being executed twice. When `FLUID_DOMAIN_ACTIVE_GUIDE` is in `fds->active_fields` this indicates that the pointer in `mPhiGuideIn` has been set and the guiding is already computed (does not need to be computed again). Maniphest Tasks: T102257 Differential Revision: https://developer.blender.org/D16416
-rw-r--r--intern/mantaflow/intern/MANTA_main.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/intern/mantaflow/intern/MANTA_main.cpp b/intern/mantaflow/intern/MANTA_main.cpp
index 5708cdc81aa..d94c8943f78 100644
--- a/intern/mantaflow/intern/MANTA_main.cpp
+++ b/intern/mantaflow/intern/MANTA_main.cpp
@@ -58,7 +58,6 @@ MANTA::MANTA(int *res, FluidModifierData *fmd)
mUsingDiffusion = (fds->flags & FLUID_DOMAIN_USE_DIFFUSION) && mUsingLiquid;
mUsingViscosity = (fds->flags & FLUID_DOMAIN_USE_VISCOSITY) && mUsingLiquid;
mUsingMVel = (fds->flags & FLUID_DOMAIN_USE_SPEED_VECTORS) && mUsingLiquid;
- mUsingGuiding = (fds->flags & FLUID_DOMAIN_USE_GUIDE);
mUsingDrops = (fds->particle_type & FLUID_DOMAIN_PARTICLE_SPRAY) && mUsingLiquid;
mUsingBubbles = (fds->particle_type & FLUID_DOMAIN_PARTICLE_BUBBLE) && mUsingLiquid;
mUsingFloats = (fds->particle_type & FLUID_DOMAIN_PARTICLE_FOAM) && mUsingLiquid;
@@ -68,6 +67,7 @@ MANTA::MANTA(int *res, FluidModifierData *fmd)
mUsingFire = (fds->active_fields & FLUID_DOMAIN_ACTIVE_FIRE) && mUsingSmoke;
mUsingColors = (fds->active_fields & FLUID_DOMAIN_ACTIVE_COLORS) && mUsingSmoke;
mUsingObstacle = (fds->active_fields & FLUID_DOMAIN_ACTIVE_OBSTACLE);
+ mUsingGuiding = (fds->active_fields & FLUID_DOMAIN_ACTIVE_GUIDE);
mUsingInvel = (fds->active_fields & FLUID_DOMAIN_ACTIVE_INVEL);
mUsingOutflow = (fds->active_fields & FLUID_DOMAIN_ACTIVE_OUTFLOW);