Fix #108229: Wider tolerance shuffling NLA strips

In `transdata_get_time_shuffle_offset_side`, the tolerance for
terminating the loop is too tight, sometimes it will lead to a infinite
loop due to non-integral start/end values. Now fixed.

Pull Request: https://projects.blender.org/blender/blender/pulls/108257
This commit is contained in:
YimingWu
2023-06-08 04:15:45 +02:00
committed by YimingWu
parent b9ddf2aec6
commit 116cbcbc86

View File

@@ -119,7 +119,9 @@ static float transdata_get_time_shuffle_offset_side(ListBase *trans_datas, const
}
total_offset += offset;
} while (!IS_EQF(offset, 0.0f));
} while (!IS_EQT(offset, 0.0f, 1e-4));
/* Needs a eps greater than FLT_EPS because strip->start/end could be non-integral, and after
* those calculations, `offset` could fall outside of FLT_EPS. */
return total_offset;
}