#NEWLINE# @ publisher ( 'previs' ) #NEWLINE# def check_unique_shot_names( ) : #NEWLINE# #INDENT# 'check if the shot names are unique\n    ' #NEWLINE# shot_nodes = pm . ls ( type = 'shot' ) #NEWLINE# shot_names = [ ] #NEWLINE# shots_with_non_unique_shot_names = [ ] #NEWLINE# for shot in shot_nodes : #NEWLINE# #INDENT# shot_name = shot . shotName . get ( ) #NEWLINE# if ( shot_name in shot_names ) : #NEWLINE# #INDENT# shots_with_non_unique_shot_names . append ( shot_names ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# shot_names . append ( shot_name ) #NEWLINE# #UNINDENT# #UNINDENT# if ( len ( shots_with_non_unique_shot_names ) > 0 ) : #NEWLINE# #INDENT# raise PublishError ( ( 'The following shots have non-unique shot names:<br><br>%s' % ', ' . join ( map ( ( lambda x : x . shotName . get ( ) ) , shots_with_non_unique_shot_names ) ) ) )