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;
|
CCGSubSurf *ss = ccgdm->ss;
|
||||||
CCGEdgeIterator *ei = ccgSubSurf_getEdgeIterator(ss);
|
CCGEdgeIterator *ei = ccgSubSurf_getEdgeIterator(ss);
|
||||||
CCGFaceIterator *fi = ccgSubSurf_getFaceIterator(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 gridSize = ccgSubSurf_getGridSize(ss);
|
||||||
int useAging;
|
int useAging;
|
||||||
|
|
||||||
@@ -1184,13 +1185,16 @@ static void ccgDM_drawEdges(DerivedMesh *dm, int drawLooseEdges, int UNUSED(draw
|
|||||||
|
|
||||||
ccgSubSurf_getUseAgeCounts(ss, &useAging, NULL, NULL, NULL);
|
ccgSubSurf_getUseAgeCounts(ss, &useAging, NULL, NULL, NULL);
|
||||||
|
|
||||||
for (; !ccgEdgeIterator_isStopped(ei); ccgEdgeIterator_next(ei)) {
|
for (j=0; j< totedge; j++) {
|
||||||
CCGEdge *e = ccgEdgeIterator_getCurrent(ei);
|
CCGEdge *e = ccgdm->edgeMap[j].edge;
|
||||||
DMGridData *edgeData = ccgSubSurf_getEdgeDataArray(ss, e);
|
DMGridData *edgeData = ccgSubSurf_getEdgeDataArray(ss, e);
|
||||||
|
|
||||||
if (!drawLooseEdges && !ccgSubSurf_getEdgeNumFaces(e))
|
if (!drawLooseEdges && !ccgSubSurf_getEdgeNumFaces(e))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if(ccgdm->edgeFlags && !(ccgdm->edgeFlags[j] & ME_EDGEDRAW))
|
||||||
|
continue;
|
||||||
|
|
||||||
if (useAging && !(G.f&G_BACKBUFSEL)) {
|
if (useAging && !(G.f&G_BACKBUFSEL)) {
|
||||||
int ageCol = 255-ccgSubSurf_getEdgeAge(ss, e)*4;
|
int ageCol = 255-ccgSubSurf_getEdgeAge(ss, e)*4;
|
||||||
glColor3ub(0, ageCol>0?ageCol:0, 0);
|
glColor3ub(0, ageCol>0?ageCol:0, 0);
|
||||||
|
Reference in New Issue
Block a user