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>2014-09-12 04:16:50 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-09-12 04:16:50 +0400
commit26e476b7e13b6e7c6c4b1ce017e00fb3c9cc9de5 (patch)
treef6aff8947b969d9ab53911fddc2a8e450027b50f /source/blender/python/bmesh/bmesh_py_utils.c
parent194f7f0ae85ed8ab6065f9fcf526c25296a4a6a2 (diff)
Fix T41788: bmesh.utils.loop_separate, face_vert_separate() always return None
Diffstat (limited to 'source/blender/python/bmesh/bmesh_py_utils.c')
-rw-r--r--source/blender/python/bmesh/bmesh_py_utils.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/source/blender/python/bmesh/bmesh_py_utils.c b/source/blender/python/bmesh/bmesh_py_utils.c
index 88e369af8bb..7088036245a 100644
--- a/source/blender/python/bmesh/bmesh_py_utils.c
+++ b/source/blender/python/bmesh/bmesh_py_utils.c
@@ -679,7 +679,7 @@ static PyObject *bpy_bm_utils_face_vert_separate(PyObject *UNUSED(self), PyObjec
BMesh *bm;
BMLoop *l;
- BMVert *v_new;
+ BMVert *v_old, *v_new;
if (!PyArg_ParseTuple(args, "O!O!:face_vert_separate",
&BPy_BMFace_Type, &py_face,
@@ -701,9 +701,10 @@ static PyObject *bpy_bm_utils_face_vert_separate(PyObject *UNUSED(self), PyObjec
return NULL;
}
+ v_old = l->v;
v_new = BM_face_loop_separate(bm, l);
- if (v_new != l->v) {
+ if (v_new != v_old) {
return BPy_BMVert_CreatePyObject(bm, v_new);
}
else {
@@ -751,7 +752,8 @@ PyDoc_STRVAR(bpy_bm_utils_loop_separate_doc,
static PyObject *bpy_bm_utils_loop_separate(PyObject *UNUSED(self), BPy_BMLoop *value)
{
BMesh *bm;
- BMVert *v_new;
+ BMLoop *l;
+ BMVert *v_old, *v_new;
if (!BPy_BMLoop_Check(value)) {
PyErr_Format(PyExc_TypeError,
@@ -763,10 +765,12 @@ static PyObject *bpy_bm_utils_loop_separate(PyObject *UNUSED(self), BPy_BMLoop *
BPY_BM_CHECK_OBJ(value);
bm = value->bm;
+ l = value->l;
- v_new = BM_face_loop_separate(bm, value->l);
+ v_old = l->v;
+ v_new = BM_face_loop_separate(bm, l);
- if (v_new != value->l->v) {
+ if (v_new != v_old) {
return BPy_BMVert_CreatePyObject(bm, v_new);
}
else {