Created
November 14, 2017 16:32
-
-
Save rondreas/50909e065a5746f2553fd3dd0e70832f to your computer and use it in GitHub Desktop.
Get all shape nodes which deviates from Maya standard shape naming convention.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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