Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntony Riakiotakis <kalast@gmail.com>2012-11-20 13:59:57 +0400
committerAntony Riakiotakis <kalast@gmail.com>2012-11-20 13:59:57 +0400
commit1d7b36605068d63e304aeeef3112be05b5f900df (patch)
tree9087e85db28ba2394195220cfa390ef82758c6c5 /source/blender/modifiers
parentc7003a7dc80b6b89d5b78f1cde37f16ffa237e44 (diff)
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.
Diffstat (limited to 'source/blender/modifiers')
-rw-r--r--source/blender/modifiers/intern/MOD_mirror.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/source/blender/modifiers/intern/MOD_mirror.c b/source/blender/modifiers/intern/MOD_mirror.c
index 83c678db7b3..a269ca75777 100644
--- a/source/blender/modifiers/intern/MOD_mirror.c
+++ b/source/blender/modifiers/intern/MOD_mirror.c
@@ -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) */