diff options
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp index 9adc6c405e0..1fba493234e 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp @@ -12,10 +12,12 @@ extern "C" { /*--------------- Python API function prototypes for AdjacencyIterator instance -----------*/ static int AdjacencyIterator___init__(BPy_AdjacencyIterator *self, PyObject *args); +static PyObject * AdjacencyIterator_isIncoming(BPy_AdjacencyIterator *self); static PyObject * AdjacencyIterator_getObject(BPy_AdjacencyIterator *self); /*----------------------AdjacencyIterator instance definitions ----------------------------*/ static PyMethodDef BPy_AdjacencyIterator_methods[] = { + {"isIncoming", ( PyCFunction ) AdjacencyIterator_isIncoming, METH_NOARGS, "() Returns true if the current ViewEdge is is coming towards the iteration vertex. False otherwise."}, {"getObject", ( PyCFunction ) AdjacencyIterator_getObject, METH_NOARGS, "() Get object referenced by the iterator"}, {NULL, NULL, 0, NULL} }; @@ -140,6 +142,10 @@ int AdjacencyIterator___init__(BPy_AdjacencyIterator *self, PyObject *args ) } +PyObject * AdjacencyIterator_isIncoming(BPy_AdjacencyIterator *self) { + return PyBool_from_bool(self->a_it->isIncoming()); +} + PyObject * AdjacencyIterator_getObject(BPy_AdjacencyIterator *self) { ViewEdge *ve = self->a_it->operator*(); |