diff options
author | Maxime Curioni <maxime.curioni@gmail.com> | 2008-07-24 12:29:48 +0400 |
---|---|---|
committer | Maxime Curioni <maxime.curioni@gmail.com> | 2008-07-24 12:29:48 +0400 |
commit | a0359c37506d05589bae86e4818fa653c8f281ab (patch) | |
tree | 35927f22801fa65585ac6f076abb29406189dd2a /source/blender/freestyle/intern/python/BPy_Convert.cpp | |
parent | dd899939dabae68564f7a1d1994b50ee2f2cf8be (diff) |
soc-2008-mxcurioni: added (without testing) the following classes: BBox, SShape, ViewShape. Also corrected a few typos (Get#->get#).
Diffstat (limited to 'source/blender/freestyle/intern/python/BPy_Convert.cpp')
-rw-r--r-- | source/blender/freestyle/intern/python/BPy_Convert.cpp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/source/blender/freestyle/intern/python/BPy_Convert.cpp b/source/blender/freestyle/intern/python/BPy_Convert.cpp index 89fa677aac0..c052acb446f 100644 --- a/source/blender/freestyle/intern/python/BPy_Convert.cpp +++ b/source/blender/freestyle/intern/python/BPy_Convert.cpp @@ -105,6 +105,37 @@ PyObject * BPy_StrokeVertex_from_StrokeVertex( StrokeVertex& sv ) { return py_sv; } +PyObject * BPy_ViewVertex_from_ViewVertex_ptr( ViewVertex *vv ) { + PyObject *py_vv = ViewVertex_Type.tp_new( &ViewVertex_Type, 0, 0 ); + ((BPy_ViewVertex *) py_vv)->vv = vv; + ((BPy_ViewVertex *) py_vv)->py_if0D.if0D = ((BPy_ViewVertex *) py_vv)->vv; + + return py_vv; +} + +PyObject * BPy_BBox_from_BBox( BBox< Vec3r > &bb ) { + PyObject *py_bb = BBox_Type.tp_new( &BBox_Type, 0, 0 ); + ((BPy_BBox *) py_bb)->bb = new BBox< Vec3r >( bb ); + + return py_bb; +} + +PyObject * BPy_ViewEdge_from_ViewEdge( ViewEdge& ve ) { + PyObject *py_ve = ViewEdge_Type.tp_new( &ViewEdge_Type, 0, 0 ); + ((BPy_ViewEdge *) py_ve)->ve = new ViewEdge( ve ); + ((BPy_ViewEdge *) py_ve)->py_if1D.if1D = ((BPy_ViewEdge *) py_ve)->ve; + + return py_ve; +} + +PyObject * BPy_SShape_from_SShape( SShape& ss ) { + PyObject *py_ss = SShape_Type.tp_new( &SShape_Type, 0, 0 ); + ((BPy_SShape *) py_ss)->ss = new SShape( ss ); + + return py_ss; +} + + /////////////////////////////////////////////////////////////////////////////////////////// #ifdef __cplusplus |