示例#1
0
 def checker(self, x):
     #The checker gets called before the BulkMaterialWidget gets initialized
     #when the parameter is part of a registeredclass. Have to supress
     #the exception in this case when the material gets deleted.
     if x in materialmanager.getMaterialNames():
         if x not in materialmanager.getBulkMaterialNames():
             raise TypeError("Expected a Bulk Material name!")
示例#2
0
 def update(self, *args):
     names = materialmanager.getBulkMaterialNames()
     names.sort()
     self.chooser.update(names)
     self.widgetChanged(len(names) > 0, interactive=0)