Pages

Friday, November 28, 2014

Remove leaf joints from selection Maya [Python]

Hi,

This is a short script i wrote to help remove leaf joints from current selection.  Helpful for rigging and skinning to joints.

#remove leaf joints from selection
import maya.cmds as cmds

sel = cmds.ls(selection = True, dag = True)
leaf = cmds.ls(selection = True, dag = True, leaf = True, type = 'joint')
cmds.select( leaf, tgl = True)

cheers,
Nate