Change winding of looptris in subsurf so they point to the same
authorAntony Riakiotakis <kalast@gmail.com>
Fri, 17 Jul 2015 12:56:10 +0000 (14:56 +0200)
committerAntony Riakiotakis <kalast@gmail.com>
Fri, 17 Jul 2015 12:56:10 +0000 (14:56 +0200)
direction as the surface.

source/blender/blenkernel/intern/subsurf_ccg.c

index 159e26ba869c39738098b85736269fdbed9bef12..df6e33ed19ca7e249d3130a09bd15a9faff379e8 100644 (file)
@@ -3620,14 +3620,14 @@ static const MLoopTri *ccgDM_getLoopTriArray(DerivedMesh *dm)
                        lt = &mlooptri[i];
                        /* quad is (0, 3, 2, 1) */
                        lt->tri[0] = (poly_index * 4) + 0;
-                       lt->tri[1] = (poly_index * 4) + 3;
-                       lt->tri[2] = (poly_index * 4) + 2;
+                       lt->tri[1] = (poly_index * 4) + 2;
+                       lt->tri[2] = (poly_index * 4) + 3;
                        lt->poly = poly_index;
 
                        lt = &mlooptri[i + 1];
                        lt->tri[0] = (poly_index * 4) + 0;
-                       lt->tri[1] = (poly_index * 4) + 2;
-                       lt->tri[2] = (poly_index * 4) + 1;
+                       lt->tri[1] = (poly_index * 4) + 1;
+                       lt->tri[2] = (poly_index * 4) + 2;
                        lt->poly = poly_index;
                }
        }