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_Convert.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_Convert.cpp')
-rw-r--r-- | source/blender/freestyle/intern/python/BPy_Convert.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/freestyle/intern/python/BPy_Convert.cpp b/source/blender/freestyle/intern/python/BPy_Convert.cpp index 1b5c143900e..6154dc67d95 100644 --- a/source/blender/freestyle/intern/python/BPy_Convert.cpp +++ b/source/blender/freestyle/intern/python/BPy_Convert.cpp @@ -109,11 +109,11 @@ PyObject * BPy_FEdge_from_FEdge( FEdge& fe ) { } PyObject * BPy_Nature_from_Nature( unsigned short n ) { - PyObject *py_n = Nature_Type.tp_new( &Nature_Type, 0, 0 ); + PyObject *py_n; PyObject *args = PyTuple_New(1); PyTuple_SetItem( args, 0, PyInt_FromLong(n) ); - Nature_Type.tp_init( py_n, args, 0 ); + py_n = Nature_Type.tp_new(&Nature_Type, args, NULL); Py_DECREF(args); return py_n; @@ -358,4 +358,4 @@ Vec3r * Vec3r_ptr_from_Vector( PyObject* obj ) { #ifdef __cplusplus } -#endif
\ No newline at end of file +#endif |