Thread: Cluster
View Single Post
  #4  
Old 12-13-2011, 12:03 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
The previous code sample is incorrect. Try the following instead:
Code:
import viz
viz.go()

maze = viz.addChild('maze.osgb')

UpperLeftWindow = viz.addWindow(pos=(0,1.0),size=(0.2,0.4))
UpperLeftWindow.visible(0,viz.SCREEN)
BirdView = viz.addView()
#Attach the bird's eye view to the upper left window
UpperLeftWindow.setView(BirdView)
#Move the view above the center of the room
BirdView.setPosition([0,50,0])
#Rotate the view so that it looks down
BirdView.setEuler([0,90,0])
	
# Show the window only on client 1
UpperLeftWindow.visible(0)
with viz.cluster.MaskedContext(viz.CLIENT1):
	UpperLeftWindow.visible(1)
You still need to add the window to all machines, but just make it visible on one.
Reply With Quote