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_UnaryPredicate1D.cpp
parentb216e4d12d8e4e416724d33a9a4c017d2809e5d0 (diff)
soc-2008-mxcurioni: completed implementing ViewEdgeIterator and ChainingIterator. Updated UnaryPredicate{0D,1D}
Diffstat (limited to 'source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp')
-rw-r--r--source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp b/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp
index b00422a0aab..54731d75d7b 100644
--- a/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp
+++ b/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp
@@ -1,6 +1,7 @@
#include "BPy_UnaryPredicate1D.h"
#include "BPy_Convert.h"
+#include "BPy_Interface1D.h"
#ifdef __cplusplus
extern "C" {
@@ -124,6 +125,7 @@ PyMODINIT_FUNC UnaryPredicate1D_Init( PyObject *module )
int UnaryPredicate1D___init__(BPy_UnaryPredicate1D *self, PyObject *args, PyObject *kwds)
{
+ self->up1D = new UnaryPredicate1D();
return 0;
}
@@ -147,14 +149,17 @@ PyObject * UnaryPredicate1D_getName( BPy_UnaryPredicate1D *self, PyObject *args)
PyObject * UnaryPredicate1D___call__( BPy_UnaryPredicate1D *self, PyObject *args)
{
- PyObject *l;
+ PyObject *py_if1D;
- if( !PyArg_ParseTuple(args, "O", &l) ) {
+ if(!( PyArg_ParseTuple(args, "O", &py_if1D) && BPy_Interface1D_Check(py_if1D) )) {
cout << "ERROR: UnaryPredicate1D___call__ " << endl;
return NULL;
}
- //TBD
+ Interface1D *if1D = ((BPy_Interface1D *) py_if1D)->if1D;
+
+ if( if1D )
+ return PyBool_from_bool( self->up1D->operator()(*if1D) );
Py_RETURN_NONE;
}