Fix #31164: constructive modifier followed by subsurf modifier did not show

face smoothing flags correctly. In fact it would do an invalid memory access,
using the -1 original index.
This commit is contained in:
Brecht Van Lommel
2012-04-30 16:29:01 +00:00
parent a5af5e8f50
commit e09a450d07

View File

@@ -3134,8 +3134,6 @@ static CCGDerivedMesh *getCCGDerivedMesh(CCGSubSurf *ss,
float *w2;
int s, x, y;
origIndex = base_polyOrigIndex ? base_polyOrigIndex[origIndex] : origIndex;
w = get_ss_weights(&wtable, gridCuts, numVerts);
ccgdm->faceMap[index].startVert = vertNum;
@@ -3146,6 +3144,8 @@ static CCGDerivedMesh *getCCGDerivedMesh(CCGSubSurf *ss,
faceFlags->mat_nr = mpoly ? mpoly[origIndex].mat_nr : 0;
faceFlags++;
origIndex = base_polyOrigIndex ? base_polyOrigIndex[origIndex] : origIndex;
/* set the face base vert */
*((int *)ccgSubSurf_getFaceUserData(ss, f)) = vertNum;