diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-04-11 03:25:44 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-04-11 03:25:44 +0400 |
commit | c68ae745b677c02899fda37a1f573ab688a99fac (patch) | |
tree | 07d8d9f0b5ed4e5ff61ceeacd9e2694d75f7501e /source/blender/python/bmesh/bmesh_py_types.c | |
parent | b9b23d697bf2682b027e9f4cc5a89a6716cf1edf (diff) |
interpolate verts as well as loops for inset.
- add vertex option to BM_face_interp_from_face, also expose via python.
Diffstat (limited to 'source/blender/python/bmesh/bmesh_py_types.c')
-rw-r--r-- | source/blender/python/bmesh/bmesh_py_types.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/source/blender/python/bmesh/bmesh_py_types.c b/source/blender/python/bmesh/bmesh_py_types.c index f49018d6e18..e7ca0cd5708 100644 --- a/source/blender/python/bmesh/bmesh_py_types.c +++ b/source/blender/python/bmesh/bmesh_py_types.c @@ -1597,21 +1597,24 @@ static PyObject *bpy_bmedge_normal_update(BPy_BMEdge *self) * ---- */ PyDoc_STRVAR(bpy_bmface_copy_from_face_interp_doc, -".. method:: copy_from_face_interp(face)\n" +".. method:: copy_from_face_interp(face, vert=True)\n" "\n" " Interpolate the customdata from another face onto this one (faces should overlap).\n" "\n" " :arg face: The face to interpolate data from.\n" " :type face: :class:`BMFace`\n" +" :arg vert: When True, also copy vertex data.\n" +" :type vert: boolean\n" ); static PyObject *bpy_bmface_copy_from_face_interp(BPy_BMFace *self, PyObject *args) { BPy_BMFace *py_face = NULL; + int do_vertex = true; BPY_BM_CHECK_OBJ(self); - if (!PyArg_ParseTuple(args, "O!:BMFace.copy_from_face_interp", - &BPy_BMFace_Type, &py_face)) + if (!PyArg_ParseTuple(args, "O!|i:BMFace.copy_from_face_interp", + &BPy_BMFace_Type, &py_face, &do_vertex)) { return NULL; } @@ -1620,7 +1623,7 @@ static PyObject *bpy_bmface_copy_from_face_interp(BPy_BMFace *self, PyObject *ar BPY_BM_CHECK_SOURCE_OBJ(py_face, bm, "BMFace.copy_from_face_interp(face)"); - BM_face_interp_from_face(bm, self->f, py_face->f); + BM_face_interp_from_face(bm, self->f, py_face->f, do_vertex); Py_RETURN_NONE; } |