diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2010-06-23 13:58:02 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2010-06-23 13:58:02 +0400 |
commit | d200243a5ca9d9cf17fb5ad1b4df711698b82b1d (patch) | |
tree | 481e30ded0b888c1b971e0b5bc4f1ed3e5a861ba /source/blender | |
parent | ee14cc198b2306f13b438577d565347e54c88938 (diff) |
Fix #22654: Converted curve from mesh disappearing
Curve object should have ob->bb=NULL if there is no derivedMesh
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/displist.c | 6 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/mesh.c | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/displist.c b/source/blender/blenkernel/intern/displist.c index 24f996fbb31..ae225fd19b7 100644 --- a/source/blender/blenkernel/intern/displist.c +++ b/source/blender/blenkernel/intern/displist.c @@ -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; + } } } diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c index 6ddc4b8bb16..cd8b2eb0a8e 100644 --- a/source/blender/blenkernel/intern/mesh.c +++ b/source/blender/blenkernel/intern/mesh.c @@ -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; + } } } |