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_orientedViewEdgeIterator.cpp')
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp20
1 files changed, 7 insertions, 13 deletions
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp
index e3dbb089d49..086109e56d1 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp
@@ -29,25 +29,19 @@ PyDoc_STRVAR(orientedViewEdgeIterator_doc,
" :arg iBrother: An orientedViewEdgeIterator object.\n"
" :type iBrother: :class:`orientedViewEdgeIterator`");
-static int orientedViewEdgeIterator_init(BPy_orientedViewEdgeIterator *self, PyObject *args)
+static int orientedViewEdgeIterator_init(BPy_orientedViewEdgeIterator *self, PyObject *args, PyObject *kwds)
{
- PyObject *obj = 0;
+ static const char *kwlist[] = {"brother", NULL};
+ PyObject *brother = 0;
- if (!PyArg_ParseTuple(args, "|O", &obj))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O!", (char **)kwlist, &orientedViewEdgeIterator_Type, &brother))
return -1;
-
- if (!obj)
+ if (!brother)
self->ove_it = new ViewVertexInternal::orientedViewEdgeIterator();
- else if (BPy_orientedViewEdgeIterator_Check(obj))
- self->ove_it = new ViewVertexInternal::orientedViewEdgeIterator(*(((BPy_orientedViewEdgeIterator *)obj)->ove_it));
- else {
- PyErr_SetString(PyExc_TypeError, "invalid argument");
- return -1;
- }
-
+ else
+ self->ove_it = new ViewVertexInternal::orientedViewEdgeIterator(*(((BPy_orientedViewEdgeIterator *)brother)->ove_it));
self->py_it.it = self->ove_it;
self->reversed = 0;
-
return 0;
}