def update_thread(self, where): debug.subthreadTest() microstructure = self.toolbox.findMicrostructure() if microstructure and where is not None: mscntxt = ooflib.common.microstructure.getMSContextFromMS( microstructure) msname = microstructure.name() mscntxt.begin_reading() try: names = pixelgroup.pixelGroupNames(microstructure, where) finally: mscntxt.end_reading() grpnames = '\n'.join(names) else: msname = '(No microstructure)' grpnames = '' mainthread.runBlock(self.reallyupdate, (msname, grpnames))
def grpdestroy(self, group, ms_name): microstructure = self.toolbox.findMicrostructure() if microstructure and microstructure.name() == ms_name: self.update(self.toolbox.currentPixel())
def grpschngd(self, ms_name): microstructure = self.toolbox.findMicrostructure() if microstructure and microstructure.name() == ms_name: self.update(self.toolbox.currentPixel())
def grpchanged(self, group, ms_name): microstructure = self.toolbox.findMicrostructure() if microstructure and microstructure.name() == ms_name: if group.name() in microstructure.groupNames(): self.update(self.toolbox.currentPixel())