我要将蒙皮权重从一个骨骼转移到另一个骨骼。有人能告诉我怎么做吗?在
此代码假定您一次只选择两个骨骼
import pymel.core as pm
oldjnt = pm.ls("*_oldJnt", sl=True, type='joint')[0]
newjnt = pm.ls("*_newJnt", sl=True, type='joint')[0]
pm.skinCluster( "skinCluster1", e=True, selectInfluenceVerts=oldjnt,)
pm.skinPercent(tmw=oldjnt, tmw=newjnt, "skinCluster1")
我不知道如何使transformMoveWeights(tmw)像在Mel中那样从一个骨骼应用到另一个骨骼。在
以下是Mel代码:
^{pr2}$
看起来你差点就搞定了,只是命令有一些语法错误。我知道你的代码只尝试从一个关节传输,但这个例子将循环通过所有匹配正确命名的关节。只要旧jnt名称与newJnt正确匹配,它就应该从正确的jnt转移权重:
我在这里使用
cmds
,但如果您愿意,也可以将其切换到pymel
。在文档中提到它只会从选定的顶点传递权重,所以在这个例子中我只选择所有顶点。在
这已经用一个球体和两个旧关节到两个新关节进行了测试。在
相关问题 更多 >
编程相关推荐