Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-04-23 08:24:11 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-04-23 08:24:11 +0400
commit8baa5fbde21f55a2e8cfa5f515767e00038fca78 (patch)
treefce58ed9a7086e98a05add5926ccd6ae9641111d /source/blender/editors/mesh
parentb51590d55df4b013a0becf9977eddb33206276ba (diff)
- fix for python freeing its own bmesh clearing the global mirror cache.
- fix for own mistake (Ctrl+T didnt set beauty peroperty). - remove bad level includes in bmesh.
Diffstat (limited to 'source/blender/editors/mesh')
-rw-r--r--source/blender/editors/mesh/editmesh_utils.c19
-rw-r--r--source/blender/editors/mesh/mesh_ops.c3
2 files changed, 16 insertions, 6 deletions
diff --git a/source/blender/editors/mesh/editmesh_utils.c b/source/blender/editors/mesh/editmesh_utils.c
index 468f5699bce..074c37850f7 100644
--- a/source/blender/editors/mesh/editmesh_utils.c
+++ b/source/blender/editors/mesh/editmesh_utils.c
@@ -150,7 +150,7 @@ int EDBM_op_finish(BMEditMesh *em, BMOperator *bmop, wmOperator *op, const int r
BKE_report(op->reports, RPT_ERROR, errmsg);
}
- BMEdit_Free(em);
+ EDBM_mesh_free(em);
*em = *emcopy;
MEM_freeN(emcopy);
@@ -284,7 +284,7 @@ void EDBM_mesh_make(ToolSettings *ts, Scene *UNUSED(scene), Object *ob)
if (me->edit_btmesh) {
/* this happens when switching shape keys */
- BMEdit_Free(me->edit_btmesh);
+ EDBM_mesh_free(me->edit_btmesh);
MEM_freeN(me->edit_btmesh);
}
@@ -315,9 +315,18 @@ void EDBM_mesh_load(Object *ob)
#endif
}
-void EDBM_mesh_free(BMEditMesh *tm)
+/**
+ * Should only be called on the active editmesh, otherwise call #BMEdit_Free
+ */
+void EDBM_mesh_free(BMEditMesh *em)
{
- BMEdit_Free(tm);
+ /* These tables aren't used yet, so it's not strictly necessary
+ * to 'end' them (with 'e' param) but if someone tries to start
+ * using them, having these in place will save a lot of pain */
+ mesh_octree_table(NULL, NULL, NULL, 'e');
+ mesh_mirrtopo_table(NULL, 'e');
+
+ BMEdit_Free(em);
}
void EDBM_index_arrays_init(BMEditMesh *tm, int forvert, int foredge, int forface)
@@ -547,7 +556,7 @@ static void undoMesh_to_editbtMesh(void *umv, void *em_v, void *UNUSED(obdata))
ob->shapenr = em->bm->shapenr;
- BMEdit_Free(em);
+ EDBM_mesh_free(em);
bm = BM_mesh_create(&bm_mesh_allocsize_default);
diff --git a/source/blender/editors/mesh/mesh_ops.c b/source/blender/editors/mesh/mesh_ops.c
index 7e8c38c9abc..4b4fef53275 100644
--- a/source/blender/editors/mesh/mesh_ops.c
+++ b/source/blender/editors/mesh/mesh_ops.c
@@ -314,7 +314,8 @@ void ED_keymap_mesh(wmKeyConfig *keyconf)
WM_keymap_add_item(keymap, "MESH_OT_fill", FKEY, KM_PRESS, KM_ALT, 0);
WM_keymap_add_item(keymap, "MESH_OT_beautify_fill", FKEY, KM_PRESS, KM_SHIFT | KM_ALT, 0);
- WM_keymap_add_item(keymap, "MESH_OT_quads_convert_to_tris", TKEY, KM_PRESS, KM_CTRL, 0);
+ kmi = WM_keymap_add_item(keymap, "MESH_OT_quads_convert_to_tris", TKEY, KM_PRESS, KM_CTRL, 0);
+ RNA_boolean_set(kmi->ptr, "use_beauty", TRUE);
kmi = WM_keymap_add_item(keymap, "MESH_OT_quads_convert_to_tris", TKEY, KM_PRESS, KM_CTRL | KM_SHIFT, 0);
RNA_boolean_set(kmi->ptr, "use_beauty", FALSE);