In this example, we'll be looking at how to create skeletons with script. We'll create two examples, one simple chain of bones and one branching set, similar to what you might want for a creature's hand.
Create a new file and add the following code:
def createSimpleSkeleton(joints): ''' Creates a simple skeleton as a single chain of bones ARGS: joints- the number of bones to create ''' cmds.select(clear=True) bones = [] pos = [0, 0, 0] for i in range(0, joints): pos[1] = i * 5 bones.append(cmds.joint(p=pos)) cmds.select(bones[0], replace=True) def createHand(fingers, joints): ''' Creates a set of 'fingers', each with a set number of joints ARGS: fingers- the number of joint chains to create joints- the number of bones per finger ''' cmds.select(clear=True) baseJoint = cmds.joint(name='wrist', p=(0,0,0)) fingerSpacing = 2 palmLen...