Fix #22654: Converted curve from mesh disappearing
Curve object should have ob->bb=NULL if there is no derivedMesh
This commit is contained in:
@@ -1855,6 +1855,12 @@ void makeDispListCurveTypes(Scene *scene, Object *ob, int forOrco)
|
||||
DM_set_object_boundbox (ob, ob->derivedFinal);
|
||||
} else {
|
||||
boundbox_displist (ob);
|
||||
|
||||
/* if there is no derivedMesh, object's boundbox is unneeded */
|
||||
if (ob->bb) {
|
||||
MEM_freeN(ob->bb);
|
||||
ob->bb= NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1186,6 +1186,12 @@ void mesh_to_curve(Scene *scene, Object *ob)
|
||||
|
||||
if (needsFree) {
|
||||
ob->derivedFinal = NULL;
|
||||
|
||||
/* curve object could have got bounding box only in special cases */
|
||||
if(ob->bb) {
|
||||
MEM_freeN(ob->bb);
|
||||
ob->bb= NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user