Skip to content

Instantly share code, notes, and snippets.

@patwooky
Created October 14, 2016 06:59
Show Gist options
  • Save patwooky/b2d4875bd44d7f6ce12208e08ea4bd84 to your computer and use it in GitHub Desktop.
Save patwooky/b2d4875bd44d7f6ce12208e08ea4bd84 to your computer and use it in GitHub Desktop.
Gets the number of shapes in your selection. If a top level is selected, all the child shape nodes are calculated. Multiple selections are allowed.
'''
Gets the number of shapes in your selection. If a top level is selected, all the child shape nodes are calculated.
Multiple selections are allowed.
'''
from pymel.core import *
print '\n--\nselection has %i shape nodes\n--\n' % len(listRelatives(ls(sl=True), ad=True, type='shape'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment