Bugfix for [#17329] Bevel Weights are lost after Subsurf
authorDaniel Genrich <daniel.genrich@gmx.net>
Tue, 9 Sep 2008 18:44:10 +0000 (18:44 +0000)
committerDaniel Genrich <daniel.genrich@gmx.net>
Tue, 9 Sep 2008 18:44:10 +0000 (18:44 +0000)
source/blender/blenkernel/intern/subsurf_ccg.c

index f334fc39daa1c351ecb66c9e10ac69d404b64eaa..d7e9fd556b639f6baaf994b54379d3a5f2df175d 100644 (file)
@@ -700,6 +700,7 @@ DerivedMesh *ss_to_cdderivedmesh(CCGSubSurf *ss, int ssFromEditmesh,
        for(index = 0; index < totedge; index++) {
                CCGEdge *e = edgeMap2[index];
                unsigned int flags = 0;
+               char bweight = 0;
                int edgeIdx = GET_INT_FROM_POINTER(ccgSubSurf_getEdgeEdgeHandle(ss, e));
 
                if(!ccgSubSurf_getEdgeNumFaces(ss, e)) flags |= ME_LOOSEEDGE;
@@ -710,12 +711,14 @@ DerivedMesh *ss_to_cdderivedmesh(CCGSubSurf *ss, int ssFromEditmesh,
                        dm->getEdge(dm, edgeIdx, &origMed);
 
                        flags |= origMed.flag;
+                       bweight = origMed.bweight;
                }
 
                for(x = 0; x < edgeSize - 1; x++) {
                        med->v1 = getEdgeIndex(ss, e, x, edgeSize);
                        med->v2 = getEdgeIndex(ss, e, x + 1, edgeSize);
                        med->flag = flags;
+                       med->bweight = bweight;
                        *origIndex = ccgDM_getEdgeMapIndex(NULL, ss, e);
                        ++med;
                        ++origIndex;