diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-12-03 06:26:13 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-12-03 06:26:13 +0400 |
commit | 61da29996a99b690a89f00418f0ef05a27524a2f (patch) | |
tree | acd0b684def910a187c6e063f68707f33ff5e18b /source/blender | |
parent | 11e87d118ee157537fb3f107227563c279ffaea6 (diff) |
fix own mistake with recent commit to skip calculating tessface. If you were already in editmode the tessfaces wouldn't get recalculated.
also minor edits to bmesh rst.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/mesh/editmesh_add.c | 7 | ||||
-rw-r--r-- | source/blender/python/bmesh/bmesh_py_api.c | 7 |
2 files changed, 5 insertions, 9 deletions
diff --git a/source/blender/editors/mesh/editmesh_add.c b/source/blender/editors/mesh/editmesh_add.c index cd6063b12d0..eed72935b3c 100644 --- a/source/blender/editors/mesh/editmesh_add.c +++ b/source/blender/editors/mesh/editmesh_add.c @@ -55,6 +55,8 @@ /* ********* add primitive operators ************* */ +/* BMESH_TODO: 'state' is not a good name, should be flipped and called 'was_editmode', + * or at least something more descriptive */ static Object *make_prim_init(bContext *C, const char *idname, float *dia, float mat[][4], int *state, const float loc[3], const float rot[3], const unsigned int layer) @@ -81,16 +83,17 @@ static Object *make_prim_init(bContext *C, const char *idname, static void make_prim_finish(bContext *C, Object *obedit, int *state, int enter_editmode) { BMEditMesh *em = BMEdit_FromObject(obedit); + const int exit_editmode = (*state && !enter_editmode); /* Primitive has all verts selected, use vert select flush * to push this up to edges & faces. */ EDBM_selectmode_flush_ex(em, SCE_SELECT_VERTEX); /* only recalc editmode tessface if we are staying in editmode */ - EDBM_update_generic(C, em, enter_editmode); + EDBM_update_generic(C, em, !exit_editmode); /* userdef */ - if (*state && !enter_editmode) { + if (exit_editmode) { ED_object_exit_editmode(C, EM_FREEDATA); /* adding EM_DO_UNDO messes up operator redo */ } WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, obedit); diff --git a/source/blender/python/bmesh/bmesh_py_api.c b/source/blender/python/bmesh/bmesh_py_api.c index 697a9259b37..18f5d895132 100644 --- a/source/blender/python/bmesh/bmesh_py_api.c +++ b/source/blender/python/bmesh/bmesh_py_api.c @@ -153,13 +153,6 @@ static struct PyMethodDef BPy_BM_methods[] = { PyDoc_STRVAR(BPy_BM_doc, "This module provides access to blenders bmesh data structures.\n" "\n" -"\n" -"Submodules:\n" -"\n" -"* :mod:`bmesh.utils`\n" -"* :mod:`bmesh.types`\n" -"\n" -"\n" ".. include:: include__bmesh.rst\n" ); static struct PyModuleDef BPy_BM_module_def = { |