Cleanup: Standardize mesh edge and poly naming
With the goal of clearly differentiating between arrays and single elements, improving consistency across Blender, and using wording that's easier to read and say, change variable names for Mesh edges and polygons/faces. Common renames are the following, with some extra prefixes, etc. - `mpoly` -> `polys` - `mpoly`/`mp`/`p` -> `poly` - `medge` -> `edges` - `med`/`ed`/`e` -> `edge` `MLoop` variables aren't affected because they will be replaced when they're split up into to arrays in #104424.
This commit is contained in:
@@ -468,28 +468,28 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh *
|
||||
|
||||
/* Create edges and adjust edge vertex indices. */
|
||||
CustomData_copy_data(&mesh->edata, &result->edata, 0, p_skip * totedge, totedge);
|
||||
MEdge *me = &edges[p_skip * totedge];
|
||||
for (k = 0; k < totedge; k++, me++) {
|
||||
me->v1 += p_skip * totvert;
|
||||
me->v2 += p_skip * totvert;
|
||||
MEdge *edge = &edges[p_skip * totedge];
|
||||
for (k = 0; k < totedge; k++, edge++) {
|
||||
edge->v1 += p_skip * totvert;
|
||||
edge->v2 += p_skip * totvert;
|
||||
}
|
||||
|
||||
/* create polys and loops */
|
||||
for (k = 0; k < totpoly; k++) {
|
||||
|
||||
const MPoly *inMP = &orig_polys[k];
|
||||
MPoly *mp = &polys[p_skip * totpoly + k];
|
||||
MPoly *poly = &polys[p_skip * totpoly + k];
|
||||
|
||||
CustomData_copy_data(&mesh->pdata, &result->pdata, k, p_skip * totpoly + k, 1);
|
||||
*mp = *inMP;
|
||||
mp->loopstart += p_skip * totloop;
|
||||
*poly = *inMP;
|
||||
poly->loopstart += p_skip * totloop;
|
||||
|
||||
{
|
||||
const MLoop *inML = &orig_loops[inMP->loopstart];
|
||||
MLoop *ml = &loops[mp->loopstart];
|
||||
int j = mp->totloop;
|
||||
MLoop *ml = &loops[poly->loopstart];
|
||||
int j = poly->totloop;
|
||||
|
||||
CustomData_copy_data(&mesh->ldata, &result->ldata, inMP->loopstart, mp->loopstart, j);
|
||||
CustomData_copy_data(&mesh->ldata, &result->ldata, inMP->loopstart, poly->loopstart, j);
|
||||
for (; j; j--, ml++, inML++) {
|
||||
ml->v = inML->v + (p_skip * totvert);
|
||||
ml->e = inML->e + (p_skip * totedge);
|
||||
|
||||
Reference in New Issue
Block a user