Fix #137392: Hair Particle "Shape Cut" operator crash after Mesh BVH caching

Mistake in bcfe4c34da
This commit is contained in:
Hans Goudey
2025-04-14 11:47:29 -04:00
parent c6d938fa72
commit 3b9c2c810d

View File

@@ -5130,7 +5130,7 @@ static void point_inside_bvh_cb(void *userdata,
{
PointInsideBVH *data = static_cast<PointInsideBVH *>(userdata);
data->bvhdata->raycast_callback(&data->bvhdata, index, ray, hit);
data->bvhdata->raycast_callback(data->bvhdata, index, ray, hit);
if (hit->index != -1) {
++data->num_hits;
@@ -5204,7 +5204,7 @@ static void shape_cut(PEData *data, int pa_index)
0.0f,
&hit,
data->shape_bvh->raycast_callback,
&data->shape_bvh);
data->shape_bvh);
if (hit.index >= 0) {
if (hit.dist < len_shape) {
cut_time = ((hit.dist / len_shape) + float(k)) / float(totkeys);