added API function to C and python

* C:  BM_vert_separate(...)
* py: bmesh.utils.vert_separate(vert, edges)

This splits off regions around the vertex, splitting on connected edges passed in a sequence.

also made minor changes
- rename python api functions _rip to _separate
- fixed bmesh iterator being iterable its self (some parts of python expect this)
- fix memory leak in bmesh python api.
This commit is contained in:
2012-03-09 00:01:38 +00:00
parent 06b2343b50
commit 27d43f3fd3
6 changed files with 154 additions and 56 deletions

View File

@@ -1324,12 +1324,6 @@ PyTypeObject BPy_IDArray_Type = {
/*********** ID Property Group iterator ********/
static PyObject *IDGroup_Iter_iterself(PyObject *self)
{
Py_XINCREF(self);
return self;
}
static PyObject *IDGroup_Iter_repr(BPy_IDGroup_Iter *self)
{
return PyUnicode_FromFormat("(ID Property Group Iter \"%s\")", self->group->prop->name);
@@ -1412,7 +1406,7 @@ PyTypeObject BPy_IDGroup_Iter_Type = {
/*** Added in release 2.2 ***/
/* Iterators */
IDGroup_Iter_iterself, /* getiterfunc tp_iter; */
PyObject_SelfIter, /* getiterfunc tp_iter; */
(iternextfunc) BPy_Group_Iter_Next, /* iternextfunc tp_iternext; */
};