def run(self, *args, **kwargs): """ This fetches the list of props (each a dictionary specifying a token) and creates the corresponding tokens in Maya. """ propsList = self.fetch('propsList', None) if not propsList: self.putErrorResult( u'No list of props specified. Unable to create tokens.', code=self.NO_PROPSLIST) return for props in propsList: TrackSceneUtils.createToken(props['uid'], props)
def run(self, *args, **kwargs): """ This script first gets the UID and the property list for the given proxy node to be created in Maya. """ uid = self.fetch('uid', None) props = self.fetch('props', None) if uid is None: self.putErrorResult( u'Invalid or missing UID. Unable to create token.') return node = TrackSceneUtils.createToken(uid, props) self.puts(nodeName=node, props=props)