Do not reset bevel/taper object when they've got incorrect type - just do

noting in makebevelcurve and calc_taper functions if type is not curve.

This avoids DNA changing depended on object recalc.
This commit is contained in:
Sergey Sharybin 2010-08-05 08:39:25 +00:00
parent a0cece42c6
commit 5f77852a47
2 changed files with 3 additions and 10 deletions

@ -1222,6 +1222,8 @@ void makebevelcurve(Scene *scene, Object *ob, ListBase *disp, int forRender)
// XXX if( ob == obedit && ob->type == OB_FONT ) return;
if(cu->bevobj) {
if (cu->bevobj->type!=OB_CURVE) return;
bevcu= cu->bevobj->data;
if(bevcu->ext1==0.0 && bevcu->ext2==0.0) {
ListBase bevdisp= {NULL, NULL};

@ -1129,7 +1129,7 @@ float calc_taper(Scene *scene, Object *taperobj, int cur, int tot)
Curve *cu;
DispList *dl;
if(taperobj==NULL) return 1.0;
if(taperobj==NULL || taperobj->type!=OB_CURVE) return 1.0;
cu= taperobj->data;
dl= cu->disp.first;
@ -1682,15 +1682,6 @@ static void do_makeDispListCurveTypes(Scene *scene, Object *ob, ListBase *dispba
float (*deformedVerts)[3];
int numVerts;
/* Bevel and taper objects should always be curves */
if (cu->bevobj && cu->bevobj->type != OB_CURVE) {
cu->bevobj = NULL;
}
if (cu->taperobj && cu->taperobj->type != OB_CURVE) {
cu->taperobj = NULL;
}
nubase= BKE_curve_nurbs(cu);
BLI_freelistN(&(cu->bev));