Skip to content

Instantly share code, notes, and snippets.

@rondreas
Created November 14, 2017 16:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rondreas/50909e065a5746f2553fd3dd0e70832f to your computer and use it in GitHub Desktop.
Save rondreas/50909e065a5746f2553fd3dd0e70832f to your computer and use it in GitHub Desktop.
Get all shape nodes which deviates from Maya standard shape naming convention.
import pymel.core as pm
def find_bad_shapes():
""" Find and select all shapes which has not inherited their names from their parent transform,
such as transformShape. """
shapes = pm.ls(type="shape")
output = list()
for shape in shapes:
if shape.nodeName() != shape.getParent().nodeName()+'Shape':
output.append(shape)
return output
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment