Finally I managed to solve this issue by creating a new python type (python extension) and using Node Visitors to assign node references upon creation.
How can I use C++ OSG objects from Python?
-
15-07-2023 - |
Question
I am working with an embedded python system which requires a C++ frontend using OpenSceneGraph for rendering visualizations. My question is:
Is there any possible way to perform this task? I need to modify C++ osg nodes from Python. Would it be an option to create wrappers for this osg nodes? If this is the answer could you provide some guidance?
La solution 3
Autres conseils
Try looking into what Cython ( http://cython.org/ ) can do for you.
The two bindings that have gotten some attention in the OSG forum / mailing list are PyOSG and the Python usage of osgSWIG
http://sourceforge.net/projects/pyosg/
https://code.google.com/p/osgswig/
Of course, you could always search and possibly re-ask your question on the OSG forum, that community is much larger than the # of folks on SO that look for OSG questions:
http://forum.openscenegraph.org
If you've never posted to their mailing list, your message will be queued until a moderator gets a chance to look at it and make sure it's not spam - since they're volunteers, this could be a week or two depending on their schedules.
Although FWIW 'Xenon' is on both SO and the mailing list and is one of the more helpful/active users on either.