Commit: 0a61116e549cedcca6dff3b792b4b05cafa45658
Author: Campbell Barton
Date:   Mon Dec 23 12:12:40 2013 +1100
http://developer.blender.org/rB0a61116e549cedcca6dff3b792b4b05cafa45658

Fix for converting unfilled 3d text into a mesh

===================================================================

M       source/blender/blenkernel/BKE_curve.h
M       source/blender/blenkernel/intern/displist.c
M       source/blender/blenkernel/intern/mesh.c

===================================================================

diff --git a/source/blender/blenkernel/BKE_curve.h 
b/source/blender/blenkernel/BKE_curve.h
index 90e2bcd..589ca68 100644
--- a/source/blender/blenkernel/BKE_curve.h
+++ b/source/blender/blenkernel/BKE_curve.h
@@ -60,6 +60,9 @@ typedef struct CurveCache {
 #define CU_DO_TILT(cu, nu) (((nu->flag & CU_2D) && (cu->flag & CU_3D) == 0) ? 
0 : 1)
 #define CU_DO_RADIUS(cu, nu) ((CU_DO_TILT(cu, nu) || ((cu)->flag & 
CU_PATH_RADIUS) || (cu)->bevobj || (cu)->ext1 != 0.0f || (cu)->ext2 != 0.0f) ? 
1 : 0)
 
+/* not 3d and not unfilled */
+#define CU_DO_2DFILL(cu)  ((((cu)->flag & CU_3D) == 0) && (((cu)->flag & 
(CU_FRONT | CU_BACK)) != 0))
+
 /* ** Curve ** */
 void BKE_curve_unlink(struct Curve *cu);
 void BKE_curve_free(struct Curve *cu);
diff --git a/source/blender/blenkernel/intern/displist.c 
b/source/blender/blenkernel/intern/displist.c
index 8611539..1abb738 100644
--- a/source/blender/blenkernel/intern/displist.c
+++ b/source/blender/blenkernel/intern/displist.c
@@ -645,10 +645,7 @@ static void bevels_to_filledpoly(Curve *cu, ListBase 
*dispbase)
 
 static void curve_to_filledpoly(Curve *cu, ListBase *UNUSED(nurb), ListBase 
*dispbase)
 {
-       if (cu->flag & CU_3D)
-               return;
-
-       if ((cu->flag & (CU_FRONT | CU_BACK)) == 0)
+       if (!CU_DO_2DFILL(cu))
                return;
 
        if (dispbase->first && ((DispList *) dispbase->first)->type == DL_SURF) 
{
diff --git a/source/blender/blenkernel/intern/mesh.c 
b/source/blender/blenkernel/intern/mesh.c
index af23a84..694c835 100644
--- a/source/blender/blenkernel/intern/mesh.c
+++ b/source/blender/blenkernel/intern/mesh.c
@@ -1151,7 +1151,7 @@ int BKE_mesh_nurbs_displist_to_mdata(Object *ob, ListBase 
*dispbase,
        float *data;
        int a, b, ofs, vertcount, startvert, totvert = 0, totedge = 0, totloop 
= 0, totvlak = 0;
        int p1, p2, p3, p4, *index;
-       const bool conv_polys = ((cu->flag & CU_3D) ||    /* 2d polys are 
filled with DL_INDEX3 displists */
+       const bool conv_polys = ((CU_DO_2DFILL(cu) == false) ||  /* 2d polys 
are filled with DL_INDEX3 displists */
                                 (ob->type == OB_SURF));  /* surf polys are 
never filled */
 
        /* count */

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to