Script that selects all of a selected type of object in a hierachy

Was on riggingdojo – credits to Chad Moore! Selects all of a certain type of object in a hierachy, all joints, curves or constraints – found it useful for resizing joints

import maya.cmds as cmds

cmds.select(cmds.ls(dag=1, ap=1, sl=1, type=”joint”))

or

cmds.select(cmds.ls(dag=1, ap=1, sl=1, type=”nurbsCurve”))

or

cmds.select(cmds.ls(dag=1, ap=1, sl=1, type=”constraint”))

Leave a Reply

Your email address will not be published. Required fields are marked *