From 7565990db264dbb7771744cea0a1c87b3e11fc3f Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Fri, 1 Aug 2008 21:55:58 +0000 Subject: soc-2008-mxcurioni: made considerable changes to support cross-language polymorphism for UnaryFunction0D, Interface0D, Interface1D. Add to change UnaryFunction1D to static UnaryFunction1D_void. Resolved namespace collision on the Image class (changed to FrsImage). There is greater support for style modules but somehow, some do not show anything yet (japanese_bigbrush being an example). --- .../blender/freestyle/intern/python/BPy_Convert.h | 25 ++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) (limited to 'source/blender/freestyle/intern/python/BPy_Convert.h') diff --git a/source/blender/freestyle/intern/python/BPy_Convert.h b/source/blender/freestyle/intern/python/BPy_Convert.h index 4bfaf4c1e17..5bfdef56278 100644 --- a/source/blender/freestyle/intern/python/BPy_Convert.h +++ b/source/blender/freestyle/intern/python/BPy_Convert.h @@ -23,6 +23,9 @@ using namespace Geometry; // Material #include "../scene_graph/Material.h" +// Nature::VertexNature, Nature::EdgeNature +#include "../winged_edge/Nature.h" + // Stroke, StrokeAttribute, StrokeVertex #include "../stroke/Stroke.h" @@ -58,16 +61,15 @@ extern "C" { #include "api2_2x/vector.h" #include "api2_2x/gen_utils.h" -PyObject * PyBool_from_bool( bool b ); -bool bool_from_PyBool( PyObject *b ); +//============================== +// C++ => Python +//============================== +PyObject * PyBool_from_bool( bool b ); PyObject * Vector_from_Vec2f( Vec2f& v ); PyObject * Vector_from_Vec3f( Vec3f& v ); PyObject * Vector_from_Vec3r( Vec3r& v ); -IntegrationType IntegrationType_from_BPy_IntegrationType( PyObject* obj ); -Stroke::MediumType MediumType_from_BPy_MediumType( PyObject* obj ); - PyObject * BPy_BBox_from_BBox( BBox< Vec3r > &bb ); PyObject * BPy_CurvePoint_from_CurvePoint( CurvePoint& cp ); PyObject * BPy_directedViewEdge_from_directedViewEdge( ViewVertex::directedViewEdge& dve ); @@ -99,8 +101,19 @@ PyObject * BPy_ChainingIterator_from_ChainingIterator( ChainingIterator& c_it ); PyObject * BPy_ChainPredicateIterator_from_ChainPredicateIterator( ChainPredicateIterator& cp_it ); PyObject * BPy_ChainSilhouetteIterator_from_ChainSilhouetteIterator( ChainSilhouetteIterator& cs_it ); +//============================== +// Python => C++ +//============================== + +bool bool_from_PyBool( PyObject *b ); +IntegrationType IntegrationType_from_BPy_IntegrationType( PyObject* obj ); +Stroke::MediumType MediumType_from_BPy_MediumType( PyObject* obj ); +Nature::EdgeNature EdgeNature_from_BPy_Nature( PyObject* obj ); +Vec2f * Vec2f_ptr_from_Vector( PyObject* obj ); +Vec3f * Vec3f_ptr_from_Vector( PyObject* obj ); +Vec3r * Vec3r_ptr_from_Vector( PyObject* obj ); + - /////////////////////////////////////////////////////////////////////////////////////////// -- cgit v1.2.3