When I try to get the width of a viewport in osgPython, I get the following error:

vp = viewer.getCamera().getViewport()
vpw = vp.width()

ERROR: testWrite (__main__.TestRW)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/mkg/projects/physlearn/src/pl/test/simTester.py", line 50, in testWrite self.vis.viewTraj(trajFile.scene, trajFile.traj, trajFile.dt, ss, self.outputDir)
 File "/home/mkg/projects/physlearn/src/pl/sim.py", line 1441, in viewTraj
   vpw = vp.width()
RuntimeError: cannot modify a const value


One thing I should mention is that I'm using fullscreen mode (windowed operation isn't yet possible in osgPython, probably due to osgIntrospection limitations). Is Viewport::width() still expected to work?

-- Matt

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

Reply via email to