Blog

Generate a list of joints from a skeleton in Maya, cut and paste into a python list

Posted by:

  1. skeletonRoot = cmds.ls(selection = True)
  2. skeletonList = cmds.listRelatives(skeletonRoot, allDescendents = True, type = 'joint')
  3. skeletonList.append(skeletonRoot[0])
  4. skeletonList.reverse()
  5. space = " " * 4
  6. for eachJoint in skeletonList:
  7. print("'" + str(eachJoint) + "'")
0
  Related Posts
  • No related posts found.

You must be logged in to post a comment.