Fix for converting unfilled 3d text into a mesh

This commit is contained in:
Campbell Barton 2013-12-23 12:12:40 +11:00
parent 7b8622457b
commit 0a61116e54
3 changed files with 5 additions and 5 deletions

View File

@ -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);

View File

@ -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) {

View File

@ -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 */