Hi!

I'm the osgPython developer. The last time I try to compile osg and
osgPython was before Producer separation. Now I am compiling osg CVS to
check that osgPython continues compiling properly.

Nowadays, osgPython is a C++ project that uses the boost::python library.
I'm not an expert in python-dev library, so I decided to use boost::python
because it make more easy the job. I don't have  the knowledge to change the
boost::python dependency to use the python-dev library. If someone have
experience in python-dev and want to help, please contact me.


osgPython bindings uses internally osgIntrospection. osgIntrospection is a
great tool to explore a scene and it permits you to create a
osgEdit/osgDesigner in a pair of days, but have some limitations in order to
create language bindings like osgPython/osgLua.


osgIntrospection do not exports operators, you can create osg::Vec3
variables, but you can not add them, multiply, etc....
osgPython solves/hacks this by exporting manually basic types like
osg::Vec3, osg::Vec2, osg::Matrix, osg::Quat, etc...  (BasicTypes.cpp)

osgIntrospection does not export global functions like osgDB::readNodefile.
osgPython/osgLua solves/hacks this by manually export those functions.

It would be great having the possibility of declare new classes inside the
scripts, currently you can not create a new class that inherits form another
using osgIntrospection, this can be simulated with osgIntrospection by
adding a new callback system for virtual methods,  then we can capture them
from python/lua. With that mechanism, inheritance inside the scripts will be
possible.

For example to have a NodeCallback in osgLua it was necessary to export
manually a new class, but it was an osgLua-dependent hack and for each new
script language it will be necessary to do it each time. May be we can think
in a common solution from osgIntrospection to avoid that kind of "hacks".



Miguel Escriva
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to