import maya.cmds as c
select0 = c.ls(selection = True)
pelvis2 = select0
c.duplicate(select0)
select1 = c.ls(selection = True)
pelvis = select1
print select1
select2 = c.pickWalk(direction = 'down')
print select2
selectTry = c.pickWalk(direction = 'right')
if (selectTry == select2):
print 'no same level bone'
can_walk_right = False
else:
print 'have same level bone'
can_walk_right = True
selectTry_Position = c.xform(selectTry,q = True,t = True,relative = True)
if (selectTry_Position[1]<0):
if (selectTry_Position[0]>0):
left_leg = selectTry
print 'left_leg'
if (selectTry_Position[0]<0):
right_leg = selectTry
print 'right_leg'
if (selectTry_Position[1]>0):
print 'spine'
spine_ins = selectTry
selectTry2 = c.pickWalk(direction = 'right')
selectTry2_Position = c.xform(selectTry2,q = True,t = True,relative = True)
if (selectTry2_Position[1]<0):
if (selectTry2_Position[0]>0):
left_leg = selectTry2
print 'left_leg'
if (selectTry2_Position[0]<0):
right_leg = selectTry2
print 'right_leg'
if (selectTry2_Position[1]>0):
print 'spine'
spine_ins = selectTry2
selectTry3 = c.pickWalk(direction = 'right')
selectTry3_Position = c.xform(selectTry3,q = True,t = True,relative = True)
if (selectTry3_Position[1]<0):
if (selectTry3_Position[0]>0):
left_leg = selectTry3
print 'left_leg'
if (selectTry3_P
ue4 动画镜像
最新推荐文章于 2023-03-29 17:13:09 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)