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:
Diffstat (limited to 'source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp')
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp
index 649447f1db6..383480b8a9d 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp
@@ -1,5 +1,6 @@
#include "BPy_SVertexIterator.h"
+#include "../BPy_Convert.h"
#include "../Interface0D/BPy_SVertex.h"
#include "../Interface1D/BPy_FEdge.h"
@@ -15,10 +16,13 @@ static int SVertexIterator___init__(BPy_SVertexIterator *self, PyObject *args);
static PyObject * SVertexIterator_t( BPy_SVertexIterator *self );
static PyObject * SVertexIterator_u( BPy_SVertexIterator *self );
+static PyObject * SVertexIterator_getObject( BPy_SVertexIterator *self);
+
/*----------------------SVertexIterator instance definitions ----------------------------*/
static PyMethodDef BPy_SVertexIterator_methods[] = {
{"t", ( PyCFunction ) SVertexIterator_t, METH_NOARGS, "( )Returns the curvilinear abscissa."},
{"u", ( PyCFunction ) SVertexIterator_u, METH_NOARGS, "( )Returns the point parameter in the curve 0<=u<=1."},
+ {"getObject", ( PyCFunction ) SVertexIterator_getObject, METH_NOARGS, "() Get object referenced by the iterator"},
{NULL, NULL, 0, NULL}
};
@@ -155,6 +159,11 @@ PyObject * SVertexIterator_u( BPy_SVertexIterator *self ) {
return PyFloat_FromDouble( self->sv_it->u() );
}
+PyObject * SVertexIterator_getObject( BPy_SVertexIterator *self) {
+ return BPy_SVertex_from_SVertex( self->sv_it->operator*() );
+}
+
+
///////////////////////////////////////////////////////////////////////////////////////////
#ifdef __cplusplus