def createAnnotations(self): self.annotation = { 'sourceButton': 'Click to update the Source node base on the current selection.', 'patternButton': 'Click to update the node list,\nOr to copy the Source node name if no pattern is specified.', 'patternField': 'Filter the nodes with this specific pattern.\nPut a \'*\' if you want any characters to be accepted.', 'selectSource': 'If checked, it will select the source node + the one selected in the list.\nIf not checked, it will only select the ones selected in the list.', 'reverseSelection': 'If checked, the Source node will be selected last.', 'longNames': 'If checked, it will display the full path of the nodes in the list.', 'regex': 'If you want to use real Regex syntax. By default the \'*\' joker means \'.*\'.\n\nIn Regex mode:\n.* will search for anything\n$ means it is the end of the word', 'shelfLayout': 'You can put any tool you want in this shelf.\nIt is saved if you reevaluate the list of the nodes filtered.', 'mesh': 'Polygons', 'nurbsCurve': 'Curves', 'nurbsSurface': 'NURBS', 'lambert': 'Materials', 'file': 'Textures', 'camera': 'Cameras', 'light': 'Lights', 'particle': 'Particles', } for label in self.annotation: typeUI = tdLib.shortNameOf(self.interface[label]).rstrip('1234567890') method = getattr(cmds, typeUI) method(self.interface[label], edit=True, annotation=self.annotation[label])
def sourceNode(self, value): """Store the short name of the node""" self.sourceShort = tdLib.shortNameOf(value) self._sourceNode = value