From a4a7341aef2e772b7a233ade5dbccfbb959fd8e4 Mon Sep 17 00:00:00 2001 From: Tamito Kajiyama Date: Fri, 22 Feb 2013 02:48:41 +0000 Subject: Missing code updates in the previous commit. Also improved __repr__() so that the .getName() is no longer necessary in user-defined Function0D and Function1D subclasses. --- .../intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp') diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp index 7522b05e3e4..be33fcd9932 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp @@ -63,7 +63,7 @@ static void UnaryFunction0DEdgeNature___dealloc__(BPy_UnaryFunction0DEdgeNature* static PyObject * UnaryFunction0DEdgeNature___repr__(BPy_UnaryFunction0DEdgeNature* self) { - return PyUnicode_FromFormat("type: %s - address: %p", self->uf0D_edgenature->getName().c_str(), self->uf0D_edgenature); + return PyUnicode_FromFormat("type: %s - address: %p", Py_TYPE(self)->tp_name, self->uf0D_edgenature); } static PyObject * UnaryFunction0DEdgeNature___call__(BPy_UnaryFunction0DEdgeNature *self, PyObject *args, PyObject *kwds) @@ -73,7 +73,7 @@ static PyObject * UnaryFunction0DEdgeNature___call__(BPy_UnaryFunction0DEdgeNatu if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &Interface0DIterator_Type, &obj)) return NULL; - + if (typeid(*(self->uf0D_edgenature)) == typeid(UnaryFunction0D)) { PyErr_SetString(PyExc_TypeError, "__call__ method not properly overridden"); return NULL; -- cgit v1.2.3