Mesh: Replace MLoop struct with generic attributes #104424
|
@ -275,7 +275,7 @@ typedef bool (*MeshRemapIslandsCalc)(const float (*positions)[3],
|
|||
* Calculate 'generic' UV islands, i.e. based only on actual geometry data (edge seams),
|
||||
* not some UV layers coordinates.
|
||||
*/
|
||||
bool BKE_mesh_calc_islands_loop_poly_edgeseam(const float (*positions)[3],
|
||||
bool BKE_mesh_calc_islands_loop_poly_edgeseam(const float (*vert_positions)[3],
|
||||
int totvert,
|
||||
const struct MEdge *edges,
|
||||
int totedge,
|
||||
|
@ -298,7 +298,7 @@ bool BKE_mesh_calc_islands_loop_poly_edgeseam(const float (*positions)[3],
|
|||
* Not sure it would be worth the more complex code, though,
|
||||
* those loops are supposed to be really quick to do.
|
||||
*/
|
||||
bool BKE_mesh_calc_islands_loop_poly_uvmap(float (*positions)[3],
|
||||
bool BKE_mesh_calc_islands_loop_poly_uvmap(float (*vert_positions)[3],
|
||||
int totvert,
|
||||
struct MEdge *edges,
|
||||
int totedge,
|
||||
|
|
|
@ -266,7 +266,7 @@ void BKE_pbvh_build_mesh(PBVH *pbvh,
|
|||
struct Mesh *mesh,
|
||||
const struct MPoly *mpoly,
|
||||
const struct MLoop *mloop,
|
||||
float (*positions)[3],
|
||||
float (*vert_positions)[3],
|
||||
int totvert,
|
||||
struct CustomData *vdata,
|
||||
struct CustomData *ldata,
|
||||
|
|
|
@ -1200,7 +1200,7 @@ static bool mesh_calc_islands_loop_poly_uv(const MEdge *edges,
|
|||
return true;
|
||||
}
|
||||
|
||||
bool BKE_mesh_calc_islands_loop_poly_edgeseam(const float (*positions)[3],
|
||||
bool BKE_mesh_calc_islands_loop_poly_edgeseam(const float (*vert_positions)[3],
|
||||
const int totvert,
|
||||
const MEdge *edges,
|
||||
const int totedge,
|
||||
|
@ -1210,12 +1210,12 @@ bool BKE_mesh_calc_islands_loop_poly_edgeseam(const float (*positions)[3],
|
|||
const int totloop,
|
||||
MeshIslandStore *r_island_store)
|
||||
{
|
||||
UNUSED_VARS(positions, totvert);
|
||||
UNUSED_VARS(vert_positions, totvert);
|
||||
return mesh_calc_islands_loop_poly_uv(
|
||||
edges, totedge, polys, totpoly, loops, totloop, nullptr, r_island_store);
|
||||
}
|
||||
|
||||
bool BKE_mesh_calc_islands_loop_poly_uvmap(float (*positions)[3],
|
||||
bool BKE_mesh_calc_islands_loop_poly_uvmap(float (*vert_positions)[3],
|
||||
const int totvert,
|
||||
MEdge *edges,
|
||||
const int totedge,
|
||||
|
@ -1226,7 +1226,7 @@ bool BKE_mesh_calc_islands_loop_poly_uvmap(float (*positions)[3],
|
|||
const MLoopUV *luvs,
|
||||
MeshIslandStore *r_island_store)
|
||||
{
|
||||
UNUSED_VARS(positions, totvert);
|
||||
UNUSED_VARS(vert_positions, totvert);
|
||||
BLI_assert(luvs != nullptr);
|
||||
return mesh_calc_islands_loop_poly_uv(
|
||||
edges, totedge, polys, totpoly, loops, totloop, luvs, r_island_store);
|
||||
|
|
|
@ -811,7 +811,7 @@ void BKE_pbvh_build_mesh(PBVH *pbvh,
|
|||
Mesh *mesh,
|
||||
const MPoly *mpoly,
|
||||
const MLoop *mloop,
|
||||
float (*positions)[3],
|
||||
float (*vert_positions)[3],
|
||||
int totvert,
|
||||
struct CustomData *vdata,
|
||||
struct CustomData *ldata,
|
||||
|
@ -830,7 +830,7 @@ void BKE_pbvh_build_mesh(PBVH *pbvh,
|
|||
&mesh->pdata, CD_PROP_INT32, "material_index");
|
||||
pbvh->mloop = mloop;
|
||||
pbvh->looptri = looptri;
|
||||
pbvh->vert_positions = positions;
|
||||
pbvh->vert_positions = vert_positions;
|
||||
BKE_mesh_vertex_normals_ensure(mesh);
|
||||
pbvh->vert_normals = BKE_mesh_vertex_normals_for_write(mesh);
|
||||
pbvh->hide_vert = (bool *)CustomData_get_layer_named(&mesh->vdata, CD_PROP_BOOL, ".hide_vert");
|
||||
|
@ -867,7 +867,7 @@ void BKE_pbvh_build_mesh(PBVH *pbvh,
|
|||
BB_reset((BB *)bbc);
|
||||
|
||||
for (int j = 0; j < sides; j++) {
|
||||
BB_expand((BB *)bbc, positions[pbvh->mloop[lt->tri[j]].v]);
|
||||
BB_expand((BB *)bbc, vert_positions[pbvh->mloop[lt->tri[j]].v]);
|
||||
}
|
||||
|
||||
BBC_update_centroid(bbc);
|
||||
|
|
Loading…
Reference in New Issue