Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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