View Single Post
  #4  
Old 10-17-2006, 09:58 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi,

I tested out your script with Vizard 2.5 and experienced the same problem you described. I tried it out with Vizard 3.0 and it works fine. The problem is not caused by manipulating the viewpoint, but by adding a new viewpoint to the main window. In your script the workaround would be to replace the following code:
Code:
##############################################
##Create a new viewpoint
##############################################

objectTracker = viz.add(viz.VIEWPOINT)

###############################################
##Get and set the main window to the viewpoint
###############################################

mainWindow = viz.get(viz.MAIN_WINDOW)
mainWindow.viewpoint(objectTracker)
with:
Code:
##############################################
##Get the main viewpoint
##############################################

objectTracker = viz.get(viz.MAIN_VIEWPOINT)

###############################################
##Get the main window
###############################################

mainWindow = viz.get(viz.MAIN_WINDOW)
Reply With Quote