From aed306f2197d4cbf1738db46b88eb30646c2cbbf Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 25 Jul 2011 10:14:02 +0000 Subject: recent merges lost changes in this file, manually merge changes from -r37078:37500 --- source/blender/editors/util/ed_util.c | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) (limited to 'source/blender/editors/util') diff --git a/source/blender/editors/util/ed_util.c b/source/blender/editors/util/ed_util.c index 3dd7514429e..e83138acf46 100644 --- a/source/blender/editors/util/ed_util.c +++ b/source/blender/editors/util/ed_util.c @@ -106,25 +106,42 @@ void ED_editors_exit(bContext *C) if(sce->obedit) { Object *ob= sce->obedit; + /* global in meshtools... */ + //BMESH_TODO mesh_octree_table(NULL, NULL, NULL, 'e'); + //BMESH_TODO mesh_mirrtopo_table(NULL, 'e'); + if(ob) { if(ob->type==OB_MESH) { Mesh *me= ob->data; - if(me->edit_mesh) { - free_editMesh(me->edit_mesh); - MEM_freeN(me->edit_mesh); - me->edit_mesh= NULL; + if(me->edit_btmesh) { + EDBM_FreeEditBMesh(me->edit_btmesh); + MEM_freeN(me->edit_btmesh); + me->edit_btmesh= NULL; } } else if(ob->type==OB_ARMATURE) { ED_armature_edit_free(ob); } + else if(ob->type==OB_FONT) { + // free_editText(); + } + // else if(ob->type==OB_MBALL) + // BLI_freelistN(&editelems); + // free_editLatt(); + // free_posebuf(); // XXX this is still a global... + } + } + else if(sce->basact && sce->basact->object) { + Object *ob= sce->basact->object; + + /* if weight-painting is on, free mesh octree data */ + if(ob->mode & OB_MODE_WEIGHT_PAINT) { + //BMESH_TODO mesh_octree_table(NULL, NULL, NULL, 'e'); + //BMESH_TODO mesh_mirrtopo_table(NULL, 'e'); } } } - - /* global in meshtools... */ - mesh_octree_table(NULL, NULL, NULL, 'e'); - mesh_mirrtopo_table(NULL, 'e'); + } -- cgit v1.2.3