diff options
-rw-r--r-- | doc/python_api/rst/include__bmesh.rst | 7 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_add.c | 7 | ||||
-rw-r--r-- | source/blender/python/bmesh/bmesh_py_api.c | 7 |
3 files changed, 12 insertions, 9 deletions
diff --git a/doc/python_api/rst/include__bmesh.rst b/doc/python_api/rst/include__bmesh.rst index a55bf71b60f..d804b889e20 100644 --- a/doc/python_api/rst/include__bmesh.rst +++ b/doc/python_api/rst/include__bmesh.rst @@ -4,6 +4,13 @@ ./blender.bin -b -noaudio -P doc/python_api/sphinx_doc_gen.py -- --partial bmesh* ; cd doc/python_api ; sphinx-build sphinx-in sphinx-out ; cd ../../ +Submodules: + +* :mod:`bmesh.ops` +* :mod:`bmesh.types` +* :mod:`bmesh.utils` + + Intro ----- 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 = { |