本文整理汇总了Python中ngSkinTools.utils.Utils.mel方法的典型用法代码示例。如果您正苦于以下问题:Python Utils.mel方法的具体用法?Python Utils.mel怎么用?Python Utils.mel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ngSkinTools.utils.Utils
的用法示例。
在下文中一共展示了Utils.mel方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: selectPaintWeightsInfluence
# 需要导入模块: from ngSkinTools.utils import Utils [as 别名]
# 或者: from ngSkinTools.utils.Utils import mel [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)