#NEWLINE# @ publisher ( 'model' ) #NEWLINE# def check_if_leaf_mesh_nodes_have_no_transformation( ) : #NEWLINE# #INDENT# 'checks if all the Mesh transforms have 0 transformation, but it is\n    allowed to move the mesh nodes in space with a parent group node.\n    ' #NEWLINE# mesh_nodes_with_transform_children = [ ] #NEWLINE# for node in pm . ls ( dag = 1 , type = 'mesh' ) : #NEWLINE# #INDENT# parent = node . getParent ( ) #NEWLINE# tra_under_shape = pm . ls ( parent . listRelatives ( ) , type = 'transform' ) #NEWLINE# if len ( tra_under_shape ) : #NEWLINE# #INDENT# mesh_nodes_with_transform_children . append ( parent ) #NEWLINE# #UNINDENT# #UNINDENT# if len ( node ) : #NEWLINE# #INDENT# pm . select ( mesh_nodes_with_transform_children ) #NEWLINE# raise PublishError ( ( 'The following meshes have other objects parented to them:\n\n%s\n\nPlease remove any object under them!' % '\n' . join ( map ( ( lambda x : x . name ( ) ) , mesh_nodes_with_transform_children [ : MAX_NODE_DISPLAY ] ) ) ) )