Fix assertion unwrapping UV's on a mesh without UV's

This commit is contained in:
Campbell Barton 2023-09-08 23:15:50 +10:00
parent 52c4051d13
commit 4de525e757
1 changed files with 3 additions and 0 deletions

View File

@ -50,6 +50,9 @@ BMUVOffsets BM_uv_map_get_offsets_from_layer(const BMesh *bm, const int layer)
BMUVOffsets BM_uv_map_get_offsets(const BMesh *bm)
{
const int layer = CustomData_get_active_layer(&bm->ldata, CD_PROP_FLOAT2);
if (layer == -1) {
return {-1, -1, -1, -1};
}
return BM_uv_map_get_offsets_from_layer(bm, layer);
}