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:
authorMaxime Curioni <maxime.curioni@gmail.com>2008-07-26 23:32:47 +0400
committerMaxime Curioni <maxime.curioni@gmail.com>2008-07-26 23:32:47 +0400
commit13364bf2085097a8183c65242b3aba8f7d5c163b (patch)
tree07db99c3df941729cca314a4eb1f5376411808ba /source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp
parentb216e4d12d8e4e416724d33a9a4c017d2809e5d0 (diff)
soc-2008-mxcurioni: completed implementing ViewEdgeIterator and ChainingIterator. Updated UnaryPredicate{0D,1D}
Diffstat (limited to 'source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp')
-rw-r--r--source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp b/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp
index 29ea68c01ca..3e5168e7da1 100644
--- a/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp
+++ b/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp
@@ -1,6 +1,7 @@
#include "BPy_UnaryPredicate0D.h"
#include "BPy_Convert.h"
+#include "Iterator/BPy_Interface0DIterator.h"
#ifdef __cplusplus
extern "C" {
@@ -124,6 +125,7 @@ PyMODINIT_FUNC UnaryPredicate0D_Init( PyObject *module )
int UnaryPredicate0D___init__(BPy_UnaryPredicate0D *self, PyObject *args, PyObject *kwds)
{
+ self->up0D = new UnaryPredicate0D();
return 0;
}
@@ -147,15 +149,18 @@ PyObject * UnaryPredicate0D_getName( BPy_UnaryPredicate0D *self, PyObject *args)
PyObject * UnaryPredicate0D___call__( BPy_UnaryPredicate0D *self, PyObject *args)
{
- PyObject *l;
+ PyObject *py_if0D_it;
- if( !PyArg_ParseTuple(args, "O", &l) ) {
+ if(!( PyArg_ParseTuple(args, "O", &py_if0D_it) && BPy_Interface0DIterator_Check(py_if0D_it) )) {
cout << "ERROR: UnaryPredicate0D___call__ " << endl;
return NULL;
}
-
- //TBD
-
+
+ Interface0DIterator *if0D_it = ((BPy_Interface0DIterator *) py_if0D_it)->if0D_it;
+
+ if( if0D_it )
+ return PyBool_from_bool( self->up0D->operator()(*if0D_it) );
+
Py_RETURN_NONE;
}