diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-09-05 12:38:06 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-09-05 12:38:06 +0400 |
commit | 890cafface050f9fbd954495a5768700df4cf21a (patch) | |
tree | 21701480243665783d50f873e6142e039d9a377b /source/blender/python/bmesh | |
parent | 76aa5dfb705b633b07e8db2bfffcddb91eaf97e5 (diff) |
fix for error in bmesh api, selection setting needs to go via BM_elem_select_set else the total selected elements count isn't mantained.
Diffstat (limited to 'source/blender/python/bmesh')
-rw-r--r-- | source/blender/python/bmesh/bmesh_py_types.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/python/bmesh/bmesh_py_types.c b/source/blender/python/bmesh/bmesh_py_types.c index ad11ead29a2..92fb506497f 100644 --- a/source/blender/python/bmesh/bmesh_py_types.c +++ b/source/blender/python/bmesh/bmesh_py_types.c @@ -122,12 +122,12 @@ static int bpy_bm_elem_hflag_set(BPy_BMElem *self, PyObject *value, void *flag) param = PyLong_AsLong(value); - if (param == true) { - BM_elem_flag_enable(self->ele, hflag); - return 0; - } - else if (param == false) { - BM_elem_flag_disable(self->ele, hflag); + if ((unsigned int)param <= 1) { + if (hflag == BM_ELEM_SELECT) + BM_elem_select_set(self->bm, self->ele, param); + else + BM_elem_flag_set(self->ele, hflag, param); + return 0; } else { |