diff options
Diffstat (limited to 'source/blender/freestyle/intern/view_map')
-rwxr-xr-x | source/blender/freestyle/intern/view_map/Functions0D.h | 11 | ||||
-rwxr-xr-x | source/blender/freestyle/intern/view_map/Functions1D.h | 24 |
2 files changed, 4 insertions, 31 deletions
diff --git a/source/blender/freestyle/intern/view_map/Functions0D.h b/source/blender/freestyle/intern/view_map/Functions0D.h index dbd7d558a47..4adbc8a1bf5 100755 --- a/source/blender/freestyle/intern/view_map/Functions0D.h +++ b/source/blender/freestyle/intern/view_map/Functions0D.h @@ -95,16 +95,7 @@ UnaryFunction0D() { py_uf0D = 0;} * \return the result of the function of type T. */ virtual int operator()(Interface0DIterator& iter) { - string name( py_uf0D ? PyString_AsString(PyObject_CallMethod(py_uf0D, "getName", "")) : getName() ); - - if( py_uf0D && PyObject_HasAttrString(py_uf0D, "__call__") ) { - if (Director_BPy_UnaryFunction0D___call__( this, py_uf0D, iter) < 0) { - return -1; - } - } else { - cerr << "Warning: " << name << " operator() not implemented" << endl; - } - return 0; + return Director_BPy_UnaryFunction0D___call__( this, py_uf0D, iter ); } }; diff --git a/source/blender/freestyle/intern/view_map/Functions1D.h b/source/blender/freestyle/intern/view_map/Functions1D.h index 8dbea93dfb0..c4060e0897f 100755 --- a/source/blender/freestyle/intern/view_map/Functions1D.h +++ b/source/blender/freestyle/intern/view_map/Functions1D.h @@ -99,16 +99,7 @@ public: * \return the result of the function of type T. */ virtual int operator()(Interface1D& inter) { - string name( py_uf1D ? PyString_AsString(PyObject_CallMethod(py_uf1D, "getName", "")) : getName() ); - - if( py_uf1D && PyObject_HasAttrString(py_uf1D, "__call__") ) { - if (Director_BPy_UnaryFunction1D___call__( this, py_uf1D, inter) < 0) { - return -1; - } - } else { - cerr << "Warning: " << name << " operator() not implemented" << endl; - } - return 0; + return Director_BPy_UnaryFunction1D___call__( this, py_uf1D, inter ); } /*! Sets the integration method */ @@ -141,17 +132,8 @@ public: } int operator()(Interface1D& inter) { - string name( py_uf1D ? PyString_AsString(PyObject_CallMethod(py_uf1D, "getName", "")) : getName() ); - - if( py_uf1D && PyObject_HasAttrString(py_uf1D, "__call__") ) { - if (Director_BPy_UnaryFunction1D___call__( this, py_uf1D, inter) < 0) { - return -1; - } - } else { - cerr << "Warning: " << name << " operator() not implemented" << endl; - } - return 0; - } + return Director_BPy_UnaryFunction1D___call__( this, py_uf1D, inter ); + } void setIntegrationType(IntegrationType integration) { _integration = integration; } IntegrationType getIntegrationType() const { return _integration; } |