diff options
Diffstat (limited to 'source/blender/editors/object/object_add.c')
-rw-r--r-- | source/blender/editors/object/object_add.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index fdf46ea19a7..696d8bc2c6f 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -1036,9 +1036,7 @@ static EnumPropertyItem convert_target_items[]= { static void curvetomesh(Scene *scene, Object *ob) { - Curve *cu= ob->data; - - if(cu->disp.first==0) + if(ob->disp.first==0) makeDispListCurveTypes(scene, ob, 0); /* force creation */ nurbs_to_mesh(ob); /* also does users */ @@ -1188,7 +1186,7 @@ static int convert_exec(bContext *C, wmOperator *op) cu= newob->data; - if (!cu->disp.first) + if (!newob->disp.first) makeDispListCurveTypes(scene, newob, 0); newob->type= OB_CURVE; @@ -1225,8 +1223,12 @@ static int convert_exec(bContext *C, wmOperator *op) for(nu=cu->nurb.first; nu; nu=nu->next) nu->charidx= 0; - if(target == OB_MESH) + if(target == OB_MESH) { curvetomesh(scene, newob); + + /* meshes doesn't use displist */ + freedisplist(&newob->disp); + } } else if(ELEM(ob->type, OB_CURVE, OB_SURF)) { ob->flag |= OB_DONE; @@ -1243,6 +1245,9 @@ static int convert_exec(bContext *C, wmOperator *op) newob->data= copy_curve(ob->data); } else { newob= ob; + + /* meshes doesn't use displist */ + freedisplist(&newob->disp); } curvetomesh(scene, newob); |