Fix T104168: No active UV when reading auto-save files

Similar to 6d12d43a05, we should skip the
legacy to generic conversion if there's nothing to convert.
This commit is contained in:
Hans Goudey
2023-01-27 09:56:14 -06:00
parent 000e722c7d
commit 179605bd2d

View File

@@ -1608,6 +1608,9 @@ void BKE_mesh_legacy_convert_uvs_to_generic(Mesh *mesh)
{
using namespace blender;
using namespace blender::bke;
if (!CustomData_has_layer(&mesh->ldata, CD_MLOOPUV)) {
return;
}
/* Store layer names since they will be removed, used to set the active status of new layers.
* Use intermediate #StringRef because the names can be null. */