好的,所以我正在学习 python,我只是想在 Maya 中编写一个脚本,我可以在其中重新定位场景中的关节。我不断收到一条错误消息
# TypeError: 'list' object is not callable #
如果有人能帮我解决这个问题,我将不胜感激!!
selJnt = cmds.ls (selection=True)
for allJnts in selJnt():
get_jnt_rx = cmds.getAttr (allJnts + ".rx")
get_jnt_ry = cmds.getAttr (allJnts + ".ry")
get_jnt_rz = cmds.getAttr (allJnts + ".rz")
cmds.setAttr ((allJnts + ".jointOrientX,"), get_jnt_rx)
cmds.setAttr ((allJnts + ".jointOrientY"), get_jnt_ry)
cmds.setAttr ((allJnts + ".jointOrientZ"), get_jnt_rz)
cmds.setAttr ((allJnts + ".rx,"), 0)
cmds.setAttr ((allJnts + ".ry,"), 0)
cmds.setAttr ((allJnts + ".rz,"), 0)