diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-07-25 14:14:02 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-07-25 14:14:02 +0400 |
commit | aed306f2197d4cbf1738db46b88eb30646c2cbbf (patch) | |
tree | 12f9802188fdb2b44dd88e343764c808cf010ed3 /source/blender/editors/util/ed_util.c | |
parent | 3c68357e510bfc6abfbe27dc78e1929a5d209fef (diff) |
recent merges lost changes in this file, manually merge changes from -r37078:37500
Diffstat (limited to 'source/blender/editors/util/ed_util.c')
-rw-r--r-- | source/blender/editors/util/ed_util.c | 33 |
1 files changed, 25 insertions, 8 deletions
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'); + } |