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
path: root/source
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2012-04-30 20:29:01 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2012-04-30 20:29:01 +0400
commite09a450d07e015d0b71c8fe65e5c5a79b3eab06a (patch)
tree1ea4f615945d286ce577e3d4388aa4e389a8fb68 /source
parenta5af5e8f50b740720609342671347ae229422212 (diff)
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.
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/subsurf_ccg.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/subsurf_ccg.c b/source/blender/blenkernel/intern/subsurf_ccg.c
index 129d3a3f698..c3f864a8b2a 100644
--- a/source/blender/blenkernel/intern/subsurf_ccg.c
+++ b/source/blender/blenkernel/intern/subsurf_ccg.c
@@ -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;