def setMetaRig(self, node):
     log.info('setting internal metaRig from given node : %s' % node)
     if r9Meta.isMetaNodeInherited(node, 'MetaRig'):
         self.metaRig = r9Meta.MetaClass(node)
     else:
         self.metaRig = r9Meta.getConnectedMetaSystemRoot(node)
     return self.metaRig
 def addTimecode_to_node(self, node):
     '''
     wrapper to add the timecode attrs to a node ready for propagating
     '''
     node = r9Meta.MetaClass(node)
     node.addAttr(self.count, attrType='float')
     node.addAttr(self.samplerate, attrType='float')
     node.addAttr(self.ref, attrType='int')
 def getTimecode_from_node(self, node):
     '''
     wrapper method to get the timecode back from a given node
     :param node: node containing correctly formatted timecode data
     
     .. note:
             the node passed in has to have the correctly formatted timecode data to compute
     '''
     node = r9Meta.MetaClass(node)
     if node.hasAttr(self.ref):
         ms = (getattr(node, self.ref) + ((float(getattr(node, self.count)) / getattr(node,self.samplerate)) * 1000))
         return milliseconds_to_Timecode(ms)
 def __init__(self):
     '''
     This is a really simple proc that will stamp data onto the time node and retrieve it so that
     leads can review and enter info into the scene itself. Why the time1 node??? this saves any
     issues with merging scenes as the time node is one of the only nodes in Maya that can only
     exist once, and is managed in that way internally
     '''
     self.dataRepository = r9Meta.MetaClass('time1')
     self.dataRepository.addAttr('sceneReport', attrType="string")
     self.sceneScriptNode = "sceneReviewData"
     self.storedDataDict = {'author':"", 'date':"", 'sceneName':"", 'comment':"", 'history':""}
     self.getReportData()
     self.__deleteImportedScriptNodes()