diff --git a/lib/mayaUsd/resources/ae/usdschemabase/ae_template.py b/lib/mayaUsd/resources/ae/usdschemabase/ae_template.py index 43a92a4f3..54e4f389d 100644 --- a/lib/mayaUsd/resources/ae/usdschemabase/ae_template.py +++ b/lib/mayaUsd/resources/ae/usdschemabase/ae_template.py @@ -331,11 +331,11 @@ def addControls(self, attrNames): createdControl = controlCreator(self, attrName) if createdControl: self.defineCustom(createdControl, attrName) - self.addedAttrs.add(attrName) break except Exception as ex: # Do not let one custom control failure affect others. print('Failed to create control %s: %s' % (attrName, ex)) + self.addedAttrs.add(attrName) def suppress(self, attrName): cmds.editorTemplate(suppress=attrName) @@ -491,7 +491,7 @@ def createCustomExtraAttrs(self, sectionName, attrs, collapse): # long as the suppressed attributes are suppressed by suppress(self, control). # This function will keep all suppressed attributes into a list which will be use # by addControls(). So any suppressed attributes in extraAttrs will be ignored later. - extraAttrs = [attr for attr in self.attrS.attributeNames if attr not in self.addedAttrs] + extraAttrs = [attr for attr in self.attrS.attributeNames if attr not in self.addedAttrs and attr not in self.suppressedAttrs] sectionName = mel.eval("uiRes(\"s_TPStemplateStrings.rExtraAttributes\");") self.createSection(sectionName, extraAttrs, collapse)