#NEWLINE# def has_shape( node ) : #NEWLINE# #INDENT# 'checks if the given node has at least one child that has a shape\n    ' #NEWLINE# allowed_shapes = ( pm . nt . Mesh , pm . nt . NurbsCurve , pm . nt . NurbsSurface ) #NEWLINE# has_it = False #NEWLINE# children = node . getChildren ( ) #NEWLINE# while ( len ( children ) and ( not has_it ) ) : #NEWLINE# #INDENT# child = children . pop ( 0 ) #NEWLINE# if isinstance ( has_it , allowed_shapes ) : #NEWLINE# #INDENT# has_it = True #NEWLINE# break #NEWLINE# #UNINDENT# children += child . getChildren ( ) #NEWLINE# #UNINDENT# return has_it