diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2010-03-07 08:04:22 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2010-03-07 08:04:22 +0300 |
commit | 3ad1bfa69e8cbffc0c60c322c1e084840aa6aaa6 (patch) | |
tree | 8ef1b6b1ff0d70852b79d0d9e9aa72d022a9fbd2 /source/blender/blenkernel/intern | |
parent | 8e35d91985e6cede162cf1437b9cf7e5bc28fa21 (diff) |
Fix for convert_exec()
"Keep original" option now works for all objects' types
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/mesh.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c index 03c9af26555..2a6fc281624 100644 --- a/source/blender/blenkernel/intern/mesh.c +++ b/source/blender/blenkernel/intern/mesh.c @@ -1036,7 +1036,7 @@ void mesh_to_curve(Scene *scene, Object *ob) int totedge = dm->getNumEdges(dm); int totface = dm->getNumFaces(dm); int totedges = 0; - int i; + int i, needsFree = 0; /* only to detect edge polylines */ EdgeHash *eh = BLI_edgehash_new(); @@ -1176,9 +1176,17 @@ void mesh_to_curve(Scene *scene, Object *ob) ((Mesh *)ob->data)->id.us--; ob->data= cu; ob->type= OB_CURVE; + + /* curve objects can't contain DM in usual cases, we could free memory */ + needsFree= 1; } + dm->needsFree = needsFree; dm->release(dm); + + if (needsFree) { + ob->derivedFinal = NULL; + } } void mesh_delete_material_index(Mesh *me, int index) |