diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2008-11-09 02:56:16 +0300 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2008-11-09 02:56:16 +0300 |
commit | c3b12b50660deae59345831298c7d6eea9ab580d (patch) | |
tree | 02e99cdd94ea69c67cdcfdae0f6a536bdcf16cc0 /source/blender/freestyle/intern/python/BPy_Nature.cpp | |
parent | 1db8ac58a31b43f1286ca640c939edbfee88a51d (diff) |
Fixed a bug in Nature_Type and BPy_Nature_from_Nature() that broke all nature-related functionalities (e.g. pyNatureUP1D() and CurveNatureF1D()).
Diffstat (limited to 'source/blender/freestyle/intern/python/BPy_Nature.cpp')
-rw-r--r-- | source/blender/freestyle/intern/python/BPy_Nature.cpp | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/source/blender/freestyle/intern/python/BPy_Nature.cpp b/source/blender/freestyle/intern/python/BPy_Nature.cpp index 8a29bdb5bdf..25d80816c8e 100644 --- a/source/blender/freestyle/intern/python/BPy_Nature.cpp +++ b/source/blender/freestyle/intern/python/BPy_Nature.cpp @@ -8,9 +8,6 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// -/*--------------- Python API function prototypes for Nature instance -----------*/ -static int Nature___init__(BPy_Nature *self, PyObject *args, PyObject *kwds); - /*----------------------Nature instance definitions ----------------------------*/ static PyMethodDef BPy_Nature_methods[] = { {NULL, NULL, 0, NULL} @@ -77,14 +74,14 @@ PyTypeObject Nature_Type = { BPy_Nature_methods, /* struct PyMethodDef *tp_methods; */ NULL, /* struct PyMemberDef *tp_members; */ NULL, /* struct PyGetSetDef *tp_getset; */ - &PyInt_Type, /* struct _typeobject *tp_base; */ + NULL, /* struct _typeobject *tp_base; */ NULL, /* PyObject *tp_dict; */ NULL, /* descrgetfunc tp_descr_get; */ NULL, /* descrsetfunc tp_descr_set; */ 0, /* long tp_dictoffset; */ - (initproc)Nature___init__, /* initproc tp_init; */ + NULL, /* initproc tp_init; */ NULL, /* allocfunc tp_alloc; */ - PyType_GenericNew, /* newfunc tp_new; */ + NULL, /* newfunc tp_new; */ /* Low-level free-memory routine */ NULL, /* freefunc tp_free; */ @@ -109,6 +106,7 @@ PyMODINIT_FUNC Nature_Init( PyObject *module ) if( module == NULL ) return; + Nature_Type.tp_base = &PyInt_Type; if( PyType_Ready( &Nature_Type ) < 0 ) return; Py_INCREF( &Nature_Type ); @@ -133,14 +131,6 @@ PyMODINIT_FUNC Nature_Init( PyObject *module ) } -int Nature___init__(BPy_Nature *self, PyObject *args, PyObject *kwds) -{ - if (PyInt_Type.tp_init((PyObject *)self, args, kwds) < 0) - return -1; - - return 0; -} - /////////////////////////////////////////////////////////////////////////////////////////// #ifdef __cplusplus |