Merged changes in the trunk up to revision 54171.
[blender.git] / source / blender / blenkernel / intern / subsurf_ccg.c
index e03100280d61d75d748e7807c95a490e7d060f05..0d0944d6ea76cfb9d88b219440ba75c0d39a90e5 100644 (file)
@@ -964,7 +964,11 @@ static void ccgDM_getFinalEdge(DerivedMesh *dm, int edgeNum, MEdge *med)
 
                edgeFlag = (ccgdm->edgeFlags) ? &ccgdm->edgeFlags[i] : NULL;
                if (edgeFlag)
+#ifdef WITH_FREESTYLE
+                       flags |= (*edgeFlag & (ME_SEAM | ME_SHARP | ME_FREESTYLE_EDGE)) | ME_EDGEDRAW | ME_EDGERENDER;
+#else
                        flags |= (*edgeFlag & (ME_SEAM | ME_SHARP)) | ME_EDGEDRAW | ME_EDGERENDER;
+#endif
                else
                        flags |= ME_EDGEDRAW | ME_EDGERENDER;
 
@@ -1015,7 +1019,7 @@ static void ccgDM_getFinalFace(DerivedMesh *dm, int faceNum, MFace *mf)
        }
        else {
                mf->flag = ME_SMOOTH;
-       }
+}
 
        mf->edcode = 0;
 }
@@ -1232,7 +1236,11 @@ static void ccgDM_copyFinalEdgeArray(DerivedMesh *dm, MEdge *medge)
 
                if (edgeFlags) {
                        if (edgeIdx != -1) {
+#ifdef WITH_FREESTYLE
+                               ed_flag |= ((edgeFlags[index] & (ME_SEAM | ME_SHARP | ME_FREESTYLE_EDGE)) | ME_EDGEDRAW | ME_EDGERENDER);
+#else
                                ed_flag |= ((edgeFlags[index] & (ME_SEAM | ME_SHARP)) | ME_EDGEDRAW | ME_EDGERENDER);
+#endif
                        }
                }
                else {