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:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2009-08-01 02:13:48 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2009-08-01 02:13:48 +0400
commitba9943e4a7a6c671e427c08fc11845168a30e86a (patch)
tree99310397139b528b4ba46012389aea490597a78f /source/blender/freestyle/intern/view_map/Functions1D.h
parent6134a41270ab7629bb6e09de5462ba386861ede3 (diff)
* Implemented Python's iterator protocol in Interface0DIterator and
orientedViewEdgeIterator. * Simplified Python-related error handling in C++ class definitions. The definitions of the following C++ methods were simplified and most code segments using the C/Python API were moved to Director.cpp. ChainingIterator::init() ChainingIterator::traverse() UnaryPredicate0D::operator()() UnaryPredicate1D::operator()() BinaryPredicate0D::operator()() BinaryPredicate1D::operator()() UnaryFunction0D::operator()() UnaryFunction1D::operator()() StrokeShader.shade() * Moved part of the introspection-based automatic type conversion code from BPy_Interface0DIterator.cpp and Director.cpp to BPy_Convert.cpp for the sake of better code organization. * Fixed an uninitialized member in StrokeVertexIterator___init__().
Diffstat (limited to 'source/blender/freestyle/intern/view_map/Functions1D.h')
-rwxr-xr-xsource/blender/freestyle/intern/view_map/Functions1D.h24
1 files changed, 3 insertions, 21 deletions
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; }