def _assignmat(material, microstructure, pixels): themat = materialmanager.getMaterial(material) ms = ooflib.common.microstructure.microStructures[microstructure].getObject() pxls = placeholder.getPlaceHolderFromString(pixels) if pxls == placeholder.every: themat.assignToAllPixels(ms) else: if pxls == placeholder.selection: group = ms.pixelselection.getSelectionAsGroup() else: group = ms.findGroup(pixels) if group: themat.assignToPixelGroup(ms, group) switchboard.notify("materials changed in microstructure", ms) switchboard.notify("redraw")
def _assignmat(material, microstructure, pixels): themat = materialmanager.getMaterial(material) ms = ooflib.common.microstructure.microStructures[ microstructure].getObject() pxls = placeholder.getPlaceHolderFromString(pixels) if pxls == placeholder.every: themat.assignToAllPixels(ms) else: if pxls == placeholder.selection: group = ms.pixelselection.getSelectionAsGroup() else: group = ms.findGroup(pixels) if group: themat.assignToPixelGroup(ms, group) switchboard.notify("materials changed in microstructure", ms) switchboard.notify("redraw")
def get_value(self): rval = self.groupchooser.get_value() return placeholder.getPlaceHolderFromString(rval)
def get_value(self): rval = self.widget.get_value() return placeholder.getPlaceHolderFromString(rval)