Merge branch 'master' into blender2.8
authorSergey Sharybin <sergey.vfx@gmail.com>
Mon, 16 Jul 2018 14:18:43 +0000 (16:18 +0200)
committerSergey Sharybin <sergey.vfx@gmail.com>
Mon, 16 Jul 2018 14:18:43 +0000 (16:18 +0200)
source/blender/blenkernel/intern/subsurf_ccg.c
source/blender/makesdna/DNA_meshdata_types.h

index 092b045f13022a9f599bd587525fcebd107f4107..cead75ae65951f71eb9f19ce812ba844229c425f 100644 (file)
@@ -292,7 +292,6 @@ static int ss_sync_from_uv(CCGSubSurf *ss, CCGSubSurf *origss, DerivedMesh *dm,
 {
        MPoly *mpoly = dm->getPolyArray(dm);
        MLoop *mloop = dm->getLoopArray(dm);
-       MVert *mvert = dm->getVertArray(dm);
        int totvert = dm->getNumVerts(dm);
        int totface = dm->getNumPolys(dm);
        int i, seam;
@@ -304,13 +303,12 @@ static int ss_sync_from_uv(CCGSubSurf *ss, CCGSubSurf *origss, DerivedMesh *dm,
        BLI_array_declare(fverts);
 #endif
        EdgeSet *eset;
-       float creaseFactor = (float)ccgSubSurf_getSubdivisionLevels(ss);
        float uv[3] = {0.0f, 0.0f, 0.0f}; /* only first 2 values are written into */
 
        limit[0] = limit[1] = STD_UV_CONNECT_LIMIT;
        /* previous behavior here is without accounting for winding, however this causes stretching in
         * UV map in really simple cases with mirror + subsurf, see second part of T44530. Also, initially
-        * intention is to treat merged vertices from mirror modifier as seams, see code below with ME_VERT_MERGED
+        * intention is to treat merged vertices from mirror modifier as seams.
         * This fixes a very old regression (2.49 was correct here) */
        vmap = BKE_mesh_uv_vert_map_create(mpoly, mloop, mloopuv, totface, totvert, limit, false, true);
        if (!vmap)
@@ -327,7 +325,7 @@ static int ss_sync_from_uv(CCGSubSurf *ss, CCGSubSurf *origss, DerivedMesh *dm,
                        if (v->separate)
                                break;
 
-               seam = (v != NULL) || ((mvert + i)->flag & ME_VERT_MERGED);
+               seam = (v != NULL);
 
                for (v = BKE_mesh_uv_vert_map_get_vert(vmap, i); v; v = v->next) {
                        if (v->separate) {
@@ -365,18 +363,11 @@ static int ss_sync_from_uv(CCGSubSurf *ss, CCGSubSurf *origss, DerivedMesh *dm,
                for (j = 0, j_next = nverts - 1; j < nverts; j_next = j++) {
                        unsigned int v0 = GET_UINT_FROM_POINTER(fverts[j_next]);
                        unsigned int v1 = GET_UINT_FROM_POINTER(fverts[j]);
-                       MVert *mv0 = mvert + (ml[j_next].v);
-                       MVert *mv1 = mvert + (ml[j].v);
 
                        if (BLI_edgeset_add(eset, v0, v1)) {
                                CCGEdge *e, *orige = ccgSubSurf_getFaceEdge(origf, j_next);
                                CCGEdgeHDL ehdl = SET_INT_IN_POINTER(mp->loopstart + j_next);
-                               float crease;
-
-                               if ((mv0->flag & mv1->flag) & ME_VERT_MERGED)
-                                       crease = creaseFactor;
-                               else
-                                       crease = ccgSubSurf_getEdgeCrease(orige);
+                               float crease = ccgSubSurf_getEdgeCrease(orige);
 
                                ccgSubSurf_syncEdge(ss, ehdl, fverts[j_next], fverts[j], crease, &e);
                        }
index 551ba945253ad8dca415e641e28ca4f50347bcc7..7d79242016fc2f07b2cea828668ed215613987cf 100644 (file)
@@ -385,7 +385,7 @@ enum {
 /*     SELECT              = (1 << 0), */
        ME_VERT_TMP_TAG     = (1 << 2),
        ME_HIDE             = (1 << 4),
-       ME_VERT_MERGED      = (1 << 6),
+/*     ME_VERT_MERGED      = (1 << 6), */
        ME_VERT_PBVH_UPDATE = (1 << 7),
 };