diff options
Diffstat (limited to 'source/blender/freestyle/intern/python/Director.cpp')
-rw-r--r-- | source/blender/freestyle/intern/python/Director.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/freestyle/intern/python/Director.cpp b/source/blender/freestyle/intern/python/Director.cpp new file mode 100644 index 00000000000..6acdc665a0c --- /dev/null +++ b/source/blender/freestyle/intern/python/Director.cpp @@ -0,0 +1,12 @@ +#include "Director.h" + +#include "BPy_Convert.h" + +bool director_BPy_UnaryPredicate1D___call__( PyObject *py_up1D, Interface1D& if1D) { + cout << "Polymorphism works" << endl; + + PyObject *method = PyObject_GetAttrString( py_up1D, "__call__"); + PyObject *result = PyObject_CallFunction(method, "O", BPy_Interface1D_from_Interface1D(if1D) ); + + return bool_from_PyBool(result); +} |