bdk-blender/intern/mantaflow
Germano Cavalcante edc00429e8 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
2022-11-09 12:11:20 -03:00
..
extern File headers: SPDX License migration 2022-02-11 09:14:36 +11:00
intern Fix T102257: Crash when making an Object as Effector set to Guide and trying to scrub the timeline 2022-11-09 12:11:20 -03:00
CMakeLists.txt File headers: SPDX License migration 2022-02-11 09:14:36 +11:00