From 245a175a003e88157a906fb444fa1f38918ada38 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 24 Apr 2013 12:07:13 +0000 Subject: fix [#34657] Smoothing will not be updated in object mode, when hiding faces in edit mode and changing shape. remove the option to skip hidden faces in BM_mesh_normals_update, use openmp to speedup recalculation for high poly meshes. --- source/blender/python/bmesh/bmesh_py_types.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'source/blender/python/bmesh/bmesh_py_types.c') diff --git a/source/blender/python/bmesh/bmesh_py_types.c b/source/blender/python/bmesh/bmesh_py_types.c index cd448d4aaa0..fc69f81820a 100644 --- a/source/blender/python/bmesh/bmesh_py_types.c +++ b/source/blender/python/bmesh/bmesh_py_types.c @@ -1170,25 +1170,15 @@ static PyObject *bpy_bmesh_select_flush(BPy_BMesh *self, PyObject *value) PyDoc_STRVAR(bpy_bmesh_normal_update_doc, -".. method:: normal_update(skip_hidden=False)\n" +".. method:: normal_update()\n" "\n" " Update mesh normals.\n" -"\n" -" :arg skip_hidden: When True hidden elements are ignored.\n" -" :type skip_hidden: boolean\n" ); -static PyObject *bpy_bmesh_normal_update(BPy_BMesh *self, PyObject *args) +static PyObject *bpy_bmesh_normal_update(BPy_BMesh *self) { - - int skip_hidden = false; - BPY_BM_CHECK_OBJ(self); - if (!PyArg_ParseTuple(args, "|i:normal_update", &skip_hidden)) { - return NULL; - } - - BM_mesh_normals_update(self->bm, skip_hidden); + BM_mesh_normals_update(self->bm); Py_RETURN_NONE; } @@ -2543,7 +2533,7 @@ static struct PyMethodDef bpy_bmesh_methods[] = { /* meshdata */ {"select_flush_mode", (PyCFunction)bpy_bmesh_select_flush_mode, METH_NOARGS, bpy_bmesh_select_flush_mode_doc}, {"select_flush", (PyCFunction)bpy_bmesh_select_flush, METH_O, bpy_bmesh_select_flush_doc}, - {"normal_update", (PyCFunction)bpy_bmesh_normal_update, METH_VARARGS, bpy_bmesh_normal_update_doc}, + {"normal_update", (PyCFunction)bpy_bmesh_normal_update, METH_NOARGS, bpy_bmesh_normal_update_doc}, {"transform", (PyCFunction)bpy_bmesh_transform, METH_VARARGS | METH_KEYWORDS, bpy_bmesh_transform_doc}, {NULL, NULL, 0, NULL} }; -- cgit v1.2.3