def updateDisplayProperty(self, options): proxy = helper.idToProxy(options['proxy_id']) rep = simple.GetDisplayProperties(proxy) helper.updateProxyProperties(rep, options) # Try to bind the proper lookup table if need be if options.has_key('ColorArrayName') and len( options['ColorArrayName']) > 0: name = options['ColorArrayName'] type = options['ColorAttributeType'] nbComp = 1 if type == 'POINT_DATA': data = rep.GetRepresentedDataInformation( ).GetPointDataInformation() for i in range(data.GetNumberOfArrays()): array = data.GetArrayInformation(i) if array.GetName() == name: nbComp = array.GetNumberOfComponents() elif type == 'CELL_DATA': data = rep.GetRepresentedDataInformation( ).GetCellDataInformation() for i in range(data.GetNumberOfArrays()): array = data.GetArrayInformation(i) if array.GetName() == name: nbComp = array.GetNumberOfComponents() lut = self.lutManager.getLookupTable(name, nbComp) rep.LookupTable = lut simple.Render()
def updateDisplayProperty(self, options): proxy = helper.idToProxy(options['proxy_id']); rep = simple.GetDisplayProperties(proxy) helper.updateProxyProperties(rep, options) # Try to bind the proper lookup table if need be if options.has_key('ColorArrayName') and len(options['ColorArrayName']) > 0: name = options['ColorArrayName'] type = options['ColorAttributeType'] nbComp = 1 if type == 'POINT_DATA': data = rep.GetRepresentedDataInformation().GetPointDataInformation() for i in range(data.GetNumberOfArrays()): array = data.GetArrayInformation(i) if array.GetName() == name: nbComp = array.GetNumberOfComponents() elif type == 'CELL_DATA': data = rep.GetRepresentedDataInformation().GetCellDataInformation() for i in range(data.GetNumberOfArrays()): array = data.GetArrayInformation(i) if array.GetName() == name: nbComp = array.GetNumberOfComponents() lut = self.lutManager.getLookupTable(name, nbComp) rep.LookupTable = lut simple.Render()
def pushState(self, state): for proxy_id in state: if proxy_id == 'proxy': continue proxy = helper.idToProxy(proxy_id); helper.updateProxyProperties(proxy, state[proxy_id]) simple.Render() return helper.getProxyAsPipelineNode(state['proxy'], self.lutManager)
def pushState(self, state): proxy_type = None for proxy_id in state: if proxy_id in ['proxy', 'widget_source']: proxy_type = proxy_id continue proxy = helper.idToProxy(proxy_id); helper.updateProxyProperties(proxy, state[proxy_id]) simple.Render() if proxy_type == 'proxy': return helper.getProxyAsPipelineNode(state['proxy'], self.lutManager) elif proxy_type == 'widget_source': proxy.UpdateWidget(proxy.Observed)
def pushState(self, state): proxy_type = None for proxy_id in state: if proxy_id in ['proxy', 'widget_source']: proxy_type = proxy_id continue proxy = helper.idToProxy(proxy_id) helper.updateProxyProperties(proxy, state[proxy_id]) simple.Render() if proxy_type == 'proxy': return helper.getProxyAsPipelineNode(state['proxy'], self.lutManager) elif proxy_type == 'widget_source': proxy.UpdateWidget(proxy.Observed)