Python wrappings for Open Inventor?

Ole Martin Bjoerndalen olemb at stud.cs.uit.no
Thu Aug 17 07:37:46 EDT 2000


"Richard P. Muller" <rpm at wag.caltech.edu> writes:

> Now that SGI has released Open Inventor as an Open Source project (see:
> http://oss.sgi.com/projects/inventor/index.html) I'm curious whether
> anyone is working on Python bindings.

I was just thinking the same thing. Python would be a great match for
Inventor, since they are both very dynamic. Imagine doing something
like

>>> scene = Separator()
>>> viewer = XtExaminerViewer(scene_graph=scene)
>>> viewer.show()
>>> scene.append(Material(diffuse_color='red'))  # or (1.0, 0.0, 0.0)
>>> scene.append(Cone())

and have a red cone appear. Then imagine typing:

>>> def hello(event)
...     print 'Hello!'
>>> scene.insert(1, EventCallback(type='mouse_press', action=hello))

and have the red cone say 'Hello!' when you click it.

Since I haven't seen a response to your mail yet, I have installed
SWIG and will have a go at it. If it turns out that there is a Python
wrapper already, at least I will have learnt SWIG. :)


-- 
   Ole Martin Bjoerndalen
 http://www.cs.uit.no/~olemb/ 
    olemb at stud.cs.uit.no



More information about the Python-list mailing list