def set_current(self,canv): #print self.all #print self.current if canv in self.all: GD.canvas = self.current = canv toolbar.setTransparency(self.current.alphablend) toolbar.setPerspective(self.current.camera.perspective)
def setCurrent(self,canv): if type(canv) == int and canv in range(len(self.all)): canv = self.all[canv] if canv in self.all: GD.canvas = self.current = canv toolbar.setTransparency(self.current.alphablend) toolbar.setPerspective(self.current.camera.perspective) toolbar.setLight(self.current.lighting) self.current.display()
def setCurrent(self,canv): if type(canv) == int and canv in range(len(self.all)): canv = self.all[canv] # TEST SKIP IF ALREADY CURRENT if self.current == canv: return if canv in self.all: GD.canvas = self.current = canv toolbar.setTransparency(self.current.alphablend) toolbar.setPerspective(self.current.camera.perspective) toolbar.setLight(self.current.lighting) #toolbar.setNormals(self.current.avgnormals) # # TEST WITHOUT DISPLAY GL.glFlush()
def setCurrent(self,canv): """Make the specified viewport the current one. canv can be either a viewport or viewport number. """ # GL.glFlush() if type(canv) == int and canv in range(len(self.all)): canv = self.all[canv] ## if self.current == canv: ## # alreay current ## return if GD.canvas: GD.canvas.focus = False GD.canvas.updateGL() if canv in self.all: GD.canvas = self.current = canv GD.canvas.focus = True toolbar.setTransparency(self.current.alphablend) toolbar.setPerspective(self.current.camera.perspective) toolbar.setLight(self.current.lighting) #toolbar.setNormals(self.current.avgnormals) # GL.glFlush() GD.canvas.updateGL()
def perspective(state=True): toolbar.setPerspective(state)