diff options
Diffstat (limited to 'source/blender/python/bmesh/bmesh_py_types.c')
-rw-r--r-- | source/blender/python/bmesh/bmesh_py_types.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/source/blender/python/bmesh/bmesh_py_types.c b/source/blender/python/bmesh/bmesh_py_types.c index 1c4b52d4f42..982a58edeb9 100644 --- a/source/blender/python/bmesh/bmesh_py_types.c +++ b/source/blender/python/bmesh/bmesh_py_types.c @@ -2519,8 +2519,9 @@ static PyObject *bpy_bmvert_repr(BPy_BMVert *self) BMesh *bm = self->bm; if (bm) { + BMVert *v = self->v; return PyUnicode_FromFormat("<BMVert(%p), index=%d>", - self->v, BM_elem_index_get(self->v)); + v, BM_elem_index_get(v)); } else { return PyUnicode_FromFormat("<BMVert dead at %p>", self); @@ -2532,10 +2533,11 @@ static PyObject *bpy_bmedge_repr(BPy_BMEdge *self) BMesh *bm = self->bm; if (bm) { + BMEdge *e = self->e; return PyUnicode_FromFormat("<BMEdge(%p), index=%d, verts=(%p/%d, %p/%d)>", - self->e, BM_elem_index_get(self->e), - self->e->v1, BM_elem_index_get(self->e->v1), - self->e->v2, BM_elem_index_get(self->e->v2)); + e, BM_elem_index_get(e), + e->v1, BM_elem_index_get(e->v1), + e->v2, BM_elem_index_get(e->v2)); } else { return PyUnicode_FromFormat("<BMEdge dead at %p>", self); @@ -2547,9 +2549,10 @@ static PyObject *bpy_bmface_repr(BPy_BMFace *self) BMesh *bm = self->bm; if (bm) { + BMFace *f = self->f; return PyUnicode_FromFormat("<BMFace(%p), index=%d, totverts=%d>", - self->f, BM_elem_index_get(self->f), - self->f->len); + f, BM_elem_index_get(f), + f->len); } else { return PyUnicode_FromFormat("<BMFace dead at %p>", self); @@ -2561,11 +2564,12 @@ static PyObject *bpy_bmloop_repr(BPy_BMLoop *self) BMesh *bm = self->bm; if (bm) { + BMLoop *l = self->l; return PyUnicode_FromFormat("<BMLoop(%p), index=%d, vert=%p/%d, edge=%p/%d, face=%p/%d>", - self->l, BM_elem_index_get(self->l), - self->l->v, BM_elem_index_get(self->l->v), - self->l->e, BM_elem_index_get(self->l->e), - self->l->f, BM_elem_index_get(self->l->f)); + l, BM_elem_index_get(l), + l->v, BM_elem_index_get(l->v), + l->e, BM_elem_index_get(l->e), + l->f, BM_elem_index_get(l->f)); } else { return PyUnicode_FromFormat("<BMLoop dead at %p>", self); |