getAttr - mi: 多属性 返回一个列表
inbetween = bs1.it[0].itg[0].iti.get(mi=1)
dir(bs1.it[0].itg[0].iti[6000].igt) # 输入worldMesh的地方
weightinbetween = [(x-5000)/1000.0 for x in inbetween ]
#为bs节点属性修改显示名称(别名)(通道栏显示名称,属性名称不变)
# 获取别名
cmds.aliasAttr( 'smile', 'blendShape1.w[0]', 'frown', 'blendShape1.w[1]' )
# Result: 2 #
#查询bs所有的目标链接
cmds.aliasAttr( 'blendShape1', query=True )
设置点的bs权重,代替权重笔刷
x = {}
all_weight_name = pm.listAttr(bs1.w, m=1)
for i in range(len(all_weight_name)):
name = pm.aliasAttr(bs1.weight[i], query=True)
x['{}.weight[{}]'.format(bs1, i)] = name
print x
bs1 = pm.PyNode('blendShape1'))
for i in range(150):
# 存在多个源物体,设置单个个源物体的权重
bs1.it[0].bw[0].set(0)
# 存在多个源物体,单个源物体权重
删除多余的bs属性
pm.mel.blendShapeDeleteTargetGroup