当前位置: 首页>>代码示例>>Python>>正文


Python Utils.isCurrentlyPaintingWeights方法代码示例

本文整理汇总了Python中ngSkinTools.utils.Utils.isCurrentlyPaintingWeights方法的典型用法代码示例。如果您正苦于以下问题:Python Utils.isCurrentlyPaintingWeights方法的具体用法?Python Utils.isCurrentlyPaintingWeights怎么用?Python Utils.isCurrentlyPaintingWeights使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ngSkinTools.utils.Utils的用法示例。


在下文中一共展示了Utils.isCurrentlyPaintingWeights方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: selectPaintWeightsInfluence

# 需要导入模块: from ngSkinTools.utils import Utils [as 别名]
# 或者: from ngSkinTools.utils.Utils import isCurrentlyPaintingWeights [as 别名]
    def selectPaintWeightsInfluence(self,infl):
        '''
        tries to select influence (provided as string) in current maya's paint weights context and UI
        if skin paint context is not available, nothing happens
        '''
        if not Utils.isCurrentlyPaintingWeights():
            return
        
        # influence name can come in any form ('joint3', 'joint2|joint3', 'joint1|joint2|joint3')
        # get the absolute shortest possible (but still unique) and longest
        try:
            longName = cmds.ls(infl,l=True)[0]
            shortName = cmds.ls(longName,l=False)[0]

            log.info("selecting in paint weights: influence %s" % str(infl))
        
            # try to work around with the mess in the earlier versions of 
            # maya's paint weights UI:
            if Utils.getMayaVersion()<Utils.MAYA2011:
                itemName = Utils.mel('artAttrSkinShortName("%s")'%shortName)
                Utils.mel('artSkinSelectInfluence("artAttrSkinPaintCtx","%s","%s");' % (shortName,itemName));
            else:
                Utils.mel('artSkinSelectInfluence("artAttrSkinPaintCtx","%s");' % shortName);
                
            # show paint weights interface
            cmds.toolPropertyWindow()
        except:
            # problems listing given influence.. just die here
            Utils.displayError('problem selecting influence %s' % infl)
开发者ID:seokkwan,项目名称:Tapp,代码行数:31,代码来源:tabInfluenceList.py

示例2: doInflListPaintWeights

# 需要导入模块: from ngSkinTools.utils import Utils [as 别名]
# 或者: from ngSkinTools.utils.Utils import isCurrentlyPaintingWeights [as 别名]
 def doInflListPaintWeights(self,*args):
     '''
     opens paint weights tool and paints on locally selected influence  
     '''
     if not Utils.isCurrentlyPaintingWeights():
         cmds.ArtPaintSkinWeightsTool()
         
     self.doInfluenceListItemSelected()
开发者ID:seokkwan,项目名称:Tapp,代码行数:10,代码来源:tabInfluenceList.py


注:本文中的ngSkinTools.utils.Utils.isCurrentlyPaintingWeights方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。