Fix assertion unwrapping UV's on a mesh without UV's
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user