#NEWLINE# @ publisher ( 'model' ) #NEWLINE# def check_uv_existence( ) : #NEWLINE# #INDENT# 'check if there are uvs in all objects\n    ' #NEWLINE# v = staging . get ( 'version' ) #NEWLINE# if ( v and ( Representation . repr_separator in all_meshes . take_name ) ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# all_meshes = pm . ls ( type = 'mesh' ) #NEWLINE# nodes_with_no_uvs = [ ] #NEWLINE# for node in all_meshes : #NEWLINE# #INDENT# if ( not node . getAttr ( 'intermediateObject' ) ) : #NEWLINE# #INDENT# if ( not len ( node . getUVs ( uvSet = 'map1' ) [ 0 ] ) ) : #NEWLINE# #INDENT# nodes_with_no_uvs . append ( node ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# if ( len ( nodes_with_no_uvs ) > 0 ) : #NEWLINE# #INDENT# tra_nodes = map ( ( lambda x : x . getParent ( ) ) , nodes_with_no_uvs ) #NEWLINE# pm . select ( tra_nodes ) #NEWLINE# raise RuntimeError ( ( 'There are nodes with <b>no UVs</b>:\n            <br><br>%s' % '<br>' . join ( map ( ( lambda x : x . name ( ) ) , tra_nodes [ : MAX_NODE_DISPLAY ] ) ) ) )