当前位置: 首页>>代码示例>>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;未经允许,请勿转载。