Fix #33217, mirror modifier edges missing in wireframe mode.

I see we explicitly set the edge visibility in the code for a few
modifiers because of this flag missing. The only place that this flag is
not set is during subsurf so maybe it would make a lot more sense to set
it by default on newly created edges (currently off by default) through
bmesh and turn it off for any modifiers that may need it to be off.
This commit is contained in:
Antony Riakiotakis
2012-11-20 09:59:57 +00:00
parent c7003a7dc8
commit 1d7b366050

View File

@@ -107,7 +107,7 @@ static DerivedMesh *doMirrorOnAxis(MirrorModifierData *mmd,
const int maxLoops = dm->getNumLoops(dm);
const int maxPolys = dm->getNumPolys(dm);
MVert *mv, *mv_prev;
MEdge *me;
MEdge *me, *orig_me;
MLoop *ml;
MPoly *mp;
float mtx[4][4];
@@ -209,11 +209,14 @@ static DerivedMesh *doMirrorOnAxis(MirrorModifierData *mmd,
}
}
/* adjust mirrored edge vertex indices */
me = CDDM_get_edges(result) + maxEdges;
for (i = 0; i < maxEdges; i++, me++) {
/* adjust mirrored edge vertex indices, also set visibility to true */
orig_me = CDDM_get_edges(result);
me = orig_me + maxEdges;
for (i = 0; i < maxEdges; i++, me++, orig_me++) {
me->v1 += maxVerts;
me->v2 += maxVerts;
me->flag |= ME_EDGEDRAW | ME_EDGERENDER;
orig_me->flag |= ME_EDGEDRAW | ME_EDGERENDER;
}
/* adjust mirrored poly loopstart indices, and reverse loop order (normals) */