Fix #27921: optimal display with 2 subsurf modifiers fails.
This commit is contained in:
@@ -1176,7 +1176,8 @@ static void ccgDM_drawEdges(DerivedMesh *dm, int drawLooseEdges, int UNUSED(draw
|
||||
CCGSubSurf *ss = ccgdm->ss;
|
||||
CCGEdgeIterator *ei = ccgSubSurf_getEdgeIterator(ss);
|
||||
CCGFaceIterator *fi = ccgSubSurf_getFaceIterator(ss);
|
||||
int i, edgeSize = ccgSubSurf_getEdgeSize(ss);
|
||||
int i, j, edgeSize = ccgSubSurf_getEdgeSize(ss);
|
||||
int totedge = ccgSubSurf_getNumEdges(ss);
|
||||
int gridSize = ccgSubSurf_getGridSize(ss);
|
||||
int useAging;
|
||||
|
||||
@@ -1184,13 +1185,16 @@ static void ccgDM_drawEdges(DerivedMesh *dm, int drawLooseEdges, int UNUSED(draw
|
||||
|
||||
ccgSubSurf_getUseAgeCounts(ss, &useAging, NULL, NULL, NULL);
|
||||
|
||||
for (; !ccgEdgeIterator_isStopped(ei); ccgEdgeIterator_next(ei)) {
|
||||
CCGEdge *e = ccgEdgeIterator_getCurrent(ei);
|
||||
for (j=0; j< totedge; j++) {
|
||||
CCGEdge *e = ccgdm->edgeMap[j].edge;
|
||||
DMGridData *edgeData = ccgSubSurf_getEdgeDataArray(ss, e);
|
||||
|
||||
if (!drawLooseEdges && !ccgSubSurf_getEdgeNumFaces(e))
|
||||
continue;
|
||||
|
||||
if(ccgdm->edgeFlags && !(ccgdm->edgeFlags[j] & ME_EDGEDRAW))
|
||||
continue;
|
||||
|
||||
if (useAging && !(G.f&G_BACKBUFSEL)) {
|
||||
int ageCol = 255-ccgSubSurf_getEdgeAge(ss, e)*4;
|
||||
glColor3ub(0, ageCol>0?ageCol:0, 0);
|
||||
|
Reference in New Issue
Block a user