0
好吧,所以我正在學python,我只是想在Maya中編寫一個腳本,我可以在場景中調整關節。我不斷收到一個錯誤,說#TypeError:'list'對象不可調用#
# 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)