Fix T75111: Crash when using subframes for animated fluid collider
This is not dependent on having an armature as mentioned in T75111. The collider simply has to be animated. Reviewers: sebbas Differential Revision: https://developer.blender.org/D7251
This commit is contained in:
parent
6e505a45a1
commit
5ce41e6f57
Notes:
blender-bot
2023-02-14 05:04:52 +01:00
Referenced by issue #75111, Crash | Mataflow Liquid Sim | when using Obstacle with Armature and Sampling Substeps > 0
|
@ -770,7 +770,9 @@ static void bb_combineMaps(FluidObjectBB *output,
|
|||
|
||||
/* Values. */
|
||||
output->numobjs[index_out] = bb1.numobjs[index_in];
|
||||
output->influence[index_out] = bb1.influence[index_in];
|
||||
if (output->influence && bb1.influence) {
|
||||
output->influence[index_out] = bb1.influence[index_in];
|
||||
}
|
||||
output->distances[index_out] = bb1.distances[index_in];
|
||||
if (output->velocity && bb1.velocity) {
|
||||
copy_v3_v3(&output->velocity[index_out * 3], &bb1.velocity[index_in * 3]);
|
||||
|
@ -785,12 +787,14 @@ static void bb_combineMaps(FluidObjectBB *output,
|
|||
|
||||
/* Values. */
|
||||
output->numobjs[index_out] = MAX2(bb2->numobjs[index_in], output->numobjs[index_out]);
|
||||
if (additive) {
|
||||
output->influence[index_out] += bb2->influence[index_in] * sample_size;
|
||||
}
|
||||
else {
|
||||
output->influence[index_out] = MAX2(bb2->influence[index_in],
|
||||
output->influence[index_out]);
|
||||
if (output->influence && bb2->influence) {
|
||||
if (additive) {
|
||||
output->influence[index_out] += bb2->influence[index_in] * sample_size;
|
||||
}
|
||||
else {
|
||||
output->influence[index_out] = MAX2(bb2->influence[index_in],
|
||||
output->influence[index_out]);
|
||||
}
|
||||
}
|
||||
output->distances[index_out] = MIN2(bb2->distances[index_in],
|
||||
output->distances[index_out]);
|
||||
|
|
Loading…
Reference in New Issue