import pymel.core as pm
sel = pm.selected()[0]
namespace_old = pm.referenceQuery(sel, ns=1).split(':')[-1]
curve = pm.ls('{}:*'.format(namespace_old), type='nurbsCurve')
anicurve = [i.getParent().listConnections(c=1, s=1, d=0, p=1, type=('animCurveTL','animCurveTA','animCurveTU')) for i in curve]
anicurve = [i for i in anicurve if i]
chujiu = pm.createReference(r'S:\Shared with groups\mtz\assets\chr\chujiu\rig\chujiu.rig.rig_lay.v015\chujiu.ma', namespace='chujiu')
for i in anicurve:
for j in i:
try:
output_node = pm.PyNode(j[0].name().replace(namespace_old, chujiu.fullNamespace))
input_node = pm.PyNode(j[1].name())
input_node >> output_node
except:
print input_node,output_node
上一篇
判断动画文件中mesh是否始终隐藏
2024-05-10
下一篇
大纲排序
2024-05-10