diff options
author | Daniel Dunbar <daniel@zuster.org> | 2005-03-29 20:43:39 +0400 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2005-03-29 20:43:39 +0400 |
commit | e229722d5b20c0603f0b0cf0e559a43b4c5ec546 (patch) | |
tree | da5a3b7ca09e989aa9246f5172ef7135297659a5 /source/blender/src/editobject.c | |
parent | da0a55d2b41d563385679d9beb12c26eaf7f1f63 (diff) |
- added Mesh->derived and Mesh->decimated DerivedMesh pointers
- removed DL_MESH displist type!!!! Now store a DerivedMesh directly.
- May still be some issues left having to do with releasing this
at the right time (old code just splashed free_displist all
over the place).
Diffstat (limited to 'source/blender/src/editobject.c')
-rw-r--r-- | source/blender/src/editobject.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/src/editobject.c b/source/blender/src/editobject.c index d139b05a6f8..748d6508f55 100644 --- a/source/blender/src/editobject.c +++ b/source/blender/src/editobject.c @@ -96,6 +96,7 @@ #include "BKE_booleanops.h" #include "BKE_curve.h" #include "BKE_displist.h" +#include "BKE_DerivedMesh.h" #include "BKE_effect.h" #include "BKE_font.h" #include "BKE_global.h" @@ -2151,6 +2152,7 @@ void convertmenu(void) if (mesh_uses_displist(oldme)) { DispListMesh *dlm; + DerivedMesh *dm; basedel = base; @@ -2177,8 +2179,11 @@ void convertmenu(void) me->mat= MEM_dupallocN(oldme->mat); for(a=0; a<ob1->totcol; a++) id_us_plus((ID *)me->mat[a]); } - - dlm= subsurf_make_dispListMesh_from_mesh(oldme, oldme->subdiv, oldme->flag); + + dm= subsurf_make_derived_from_mesh(oldme, oldme->subdiv, oldme->flag); + dlm= dm->convertToDispListMesh(dm); + dm->release(dm); + displistmesh_to_mesh(dlm, ob1->data); displistmesh_free(dlm); |