PBVH: Fix crash with incorrect initialized span lengths.

PBVH doesn't store the loop size. We need to get that from the mesh.
We should perhaps also store the mloop len insize the PBVH.
This commit is contained in:
Jeroen Bakker 2022-12-13 10:15:32 +01:00
parent 8f5df25f33
commit a14a152024
1 changed files with 2 additions and 2 deletions

View File

@ -362,9 +362,9 @@ static void update_pixels(PBVH *pbvh, Mesh *mesh, Image *image, ImageUser *image
}
uv_islands::MeshData mesh_data({pbvh->looptri, pbvh->totprim},
{pbvh->mloop, pbvh->totprim},
{pbvh->mloop, mesh->totloop},
pbvh->totvert,
{ldata_uv, pbvh->totprim});
{ldata_uv, mesh->totloop});
uv_islands::UVIslands islands(mesh_data);
uv_islands::UVIslandsMask uv_masks;