Mesh: Replace MLoop struct with generic attributes #104424
|
@ -336,7 +336,7 @@ static bool dyntopo_supports_customdata_layers(const blender::Span<CustomDataLay
|
|||
return BM_attribute_stored_in_bmesh_builtin(layer.name);
|
||||
}
|
||||
/* Some layers just encode #Mesh topology or are handled as special cases for dyntopo. */
|
||||
return ELEM(layer.type, CD_MEDGE, CD_MFACE, CD_MLOOP, CD_MPOLY, CD_PAINT_MASK, CD_ORIGINDEX);
|
||||
return ELEM(layer.type, CD_MEDGE, CD_MFACE, CD_MPOLY, CD_PAINT_MASK, CD_ORIGINDEX);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
@ -48,7 +48,8 @@ Mesh *convert_ply_to_mesh(PlyData &data, Mesh *mesh, const PLYImportParams ¶
|
|||
mesh->totloop += data.faces[i].size();
|
||||
}
|
||||
CustomData_add_layer(&mesh->pdata, CD_MPOLY, CD_SET_DEFAULT, nullptr, mesh->totpoly);
|
||||
CustomData_add_layer(&mesh->ldata, CD_MLOOP, CD_SET_DEFAULT, nullptr, mesh->totloop);
|
||||
CustomData_add_layer_named(
|
||||
&mesh->ldata, CD_PROP_INT32, CD_CONSTRUCT, nullptr, mesh->totloop, ".corner_vert");
|
||||
MutableSpan<MPoly> polys = mesh->polys_for_write();
|
||||
MutableSpan<int> corner_verts = mesh->corner_verts_for_write();
|
||||
|
||||
|
|
Loading…
Reference in New Issue