本文整理汇总了Python中ngSkinTools.utils.Utils.refreshPaintWeightsTool方法的典型用法代码示例。如果您正苦于以下问题:Python Utils.refreshPaintWeightsTool方法的具体用法?Python Utils.refreshPaintWeightsTool怎么用?Python Utils.refreshPaintWeightsTool使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ngSkinTools.utils.Utils
的用法示例。
在下文中一共展示了Utils.refreshPaintWeightsTool方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: execRelax
# 需要导入模块: from ngSkinTools.utils import Utils [as 别名]
# 或者: from ngSkinTools.utils.Utils import refreshPaintWeightsTool [as 别名]
def execRelax(self,*args):
'''
relax button click handler. this is where it actually
executes skin relax, whoop-tee-doo.
'''
try:
args = {}
args['numSteps']=self.controls.numSteps.getValue()
args['stepSize']=self.controls.stepSize.getValue()
# do we need soft selection?
self.controls.softSelection.addToArgs(args)
# do we need volume association?
if self.controls.useVolumeAssociation.getValue():
args['abv']=1
args['avr']=self.controls.volumeAssociationRadius.getValue()
# add selection+highlight as arguments
# we need highlight as second argument because
# other meshes for simulation might be included only through highlight.
#
# This will never be an empty list as we tested for vertex selection available earlier
def makeList(listOrNull):
if listOrNull is None:
return []
return listOrNull
objects = makeList(cmds.ls(sl=True))+makeList(cmds.ls(hl=True))
if len(objects)==0:
raise MessageException("Nothing is selected")
# execute stuff
try:
cmds.waitCursor(state=True)
cmds.ngSkinRelax(objects,**args)
finally:
cmds.waitCursor(state=False)
Utils.refreshPaintWeightsTool()
except MessageException,err:
raise err