Cleanup: Avoid redundant custom data lookups

We pass false for the "selected" argument, so the boolean layer values
aren't used anyway.
This commit is contained in:
Hans Goudey 2023-04-23 13:23:51 -04:00
parent c5702ee87d
commit 18291930ce
1 changed files with 9 additions and 10 deletions

View File

@ -214,16 +214,15 @@ static void precalc_uv_layer(const OpenSubdiv_Converter *converter, const int la
storage->loop_uv_indices = static_cast<int *>(
MEM_malloc_arrayN(mesh->totloop, sizeof(int), "loop uv vertex index"));
}
UvVertMap *uv_vert_map = BKE_mesh_uv_vert_map_create(
storage->polys,
(const bool *)CustomData_get_layer_named(&mesh->pdata, CD_PROP_BOOL, ".hide_poly"),
(const bool *)CustomData_get_layer_named(&mesh->pdata, CD_PROP_BOOL, ".select_poly"),
storage->corner_verts.data(),
mloopuv,
num_vert,
limit,
false,
true);
UvVertMap *uv_vert_map = BKE_mesh_uv_vert_map_create(storage->polys,
nullptr,
nullptr,
storage->corner_verts.data(),
mloopuv,
num_vert,
limit,
false,
true);
/* NOTE: First UV vertex is supposed to be always marked as separate. */
storage->num_uv_coordinates = -1;
for (int vertex_index = 0; vertex_index < num_vert; vertex_index++) {