當前位置: 首頁>>代碼示例>>Python>>正文


Python Red9_CoreUtils.matchNodeLists方法代碼示例

本文整理匯總了Python中Red9_CoreUtils.matchNodeLists方法的典型用法代碼示例。如果您正苦於以下問題:Python Red9_CoreUtils.matchNodeLists方法的具體用法?Python Red9_CoreUtils.matchNodeLists怎麽用?Python Red9_CoreUtils.matchNodeLists使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Red9_CoreUtils的用法示例。


在下文中一共展示了Red9_CoreUtils.matchNodeLists方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: _matchNodesToPoseData

# 需要導入模塊: import Red9_CoreUtils [as 別名]
# 或者: from Red9_CoreUtils import matchNodeLists [as 別名]
 def _matchNodesToPoseData(self, nodes):
     '''
     Main filter to extract matching data pairs prior to processing
     return : tuple such that :  (poseDict[key], destinationNode)
     NOTE: I've changed this so that matchMethod is now an internal PoseData attr
     @param nodes: nodes to try and match from the poseDict
     '''
     matchedPairs=[]
     log.info('using matchMethod : %s' % self.matchMethod)
     if self.matchMethod=='stripPrefix' or self.matchMethod=='base':
         log.info('matchMethodStandard : %s' % self.matchMethod)
         matchedPairs=r9Core.matchNodeLists([key for key in self.poseDict.keys()], nodes, matchMethod=self.matchMethod)
     if self.matchMethod=='index':
         for i, node in enumerate(nodes):
             for key in self.poseDict.keys():
                 if int(self.poseDict[key]['ID'])==i:
                     matchedPairs.append((key,node))
                     log.info('poseKey : %s %s >> matchedSource : %s %i' % (key, self.poseDict[key]['ID'], node, i))
                     break
     if self.matchMethod=='metaData':
         getMetaDict=self.metaRig.getNodeConnectionMetaDataMap  # optimisation
         poseKeys=dict(self.poseDict)  # optimisation
         for node in nodes:
             try:
                 metaDict=getMetaDict(node)
                 for key in poseKeys:
                     if poseKeys[key]['metaData']==metaDict:
                         matchedPairs.append((key,node))
                         poseKeys.pop(key)
                         break
             except:
                 log.info('FAILURE to load MetaData pose blocks - Reverting to Name')
                 matchedPairs=r9Core.matchNodeLists([key for key in self.poseDict.keys()], nodes)
     return matchedPairs
開發者ID:nicolasboselli,項目名稱:test,代碼行數:36,代碼來源:Red9_PoseSaver.py


注:本文中的Red9_CoreUtils.matchNodeLists方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。