我很难过,尝试操作时出现此错误。
我在这里缺少什么,所以我可以为用户提供一个选择,以选择一定数量的关节链以分布成一个圆?
def DistributeRad_Chain(): # this is the command option to distribute the chains in a circle if desired
radius= cmds.floatSliderGrp("Radius", query= True, value= True)
sel= cmds.ls(sl= True)
if not sel:
print ('No chain was selected! You need to select 2 chains to start!')
return
angleBetween = 6.28/ sel
currentAngle = 0.0
for i in range(sel):
currentAngle = angleBetween * i
cmds.move(math.sin(currentAngle)*radius, 0, math.cos(currentAngle)*radius, absolute=True)