diff options
author | Maxime Curioni <maxime.curioni@gmail.com> | 2008-07-27 15:27:59 +0400 |
---|---|---|
committer | Maxime Curioni <maxime.curioni@gmail.com> | 2008-07-27 15:27:59 +0400 |
commit | 2b2df54aefa61e249d21b09c2f6ca0b82be7bed4 (patch) | |
tree | 03375720c1a655367a4c94a8ffddf8e0ccdcebb1 /source/blender/freestyle/intern/python/BPy_Convert.cpp | |
parent | 0cc6f9db3d70e443fa0162ab5bfddc55865ea70c (diff) |
soc-2008-mxcurioni: ported ALL 1D unary functions, representing 32 new classes.
Diffstat (limited to 'source/blender/freestyle/intern/python/BPy_Convert.cpp')
-rw-r--r-- | source/blender/freestyle/intern/python/BPy_Convert.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/source/blender/freestyle/intern/python/BPy_Convert.cpp b/source/blender/freestyle/intern/python/BPy_Convert.cpp index 4d66b46420a..d7b8bfa6cce 100644 --- a/source/blender/freestyle/intern/python/BPy_Convert.cpp +++ b/source/blender/freestyle/intern/python/BPy_Convert.cpp @@ -189,6 +189,22 @@ PyObject * BPy_FrsMaterial_from_Material( Material& m ){ return py_m; } +PyObject * BPy_IntegrationType_from_IntegrationType( int i ) { + PyObject *py_it = IntegrationType_Type.tp_new( &IntegrationType_Type, 0, 0 ); + + PyObject *args = PyTuple_New(1); + PyTuple_SetItem( args, 0, PyInt_FromLong(i) ); + IntegrationType_Type.tp_init( py_it, args, 0 ); + Py_DECREF(args); + + return py_it; +} + +IntegrationType IntegrationType_from_BPy_IntegrationType( PyObject* obj ) { + return static_cast<IntegrationType>( PyInt_AsLong(obj) ); +} + + /////////////////////////////////////////////////////////////////////////////////////////// |