#NEWLINE# def set_rot_preset( self , preset_name ) : #NEWLINE# #INDENT# self . init_rot_matrix ( ) #NEWLINE# try : #NEWLINE# #INDENT# r = self . rot_presets [ preset_name ] #NEWLINE# #UNINDENT# except AttributeError : #NEWLINE# #INDENT# raise ValueError ( ( '%s is not a valid rotation preset.' % preset_name ) ) #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# self . euler_rotate ( r [ 0 ] , 1 , 0 , 0 ) #NEWLINE# self . euler_rotate ( r [ 1 ] , 0 , 1 , 0 ) #NEWLINE# self . euler_rotate ( r [ 2 ] , 0 , 0 , 1 ) #NEWLINE# #UNINDENT# except AttributeError : #NEWLINE# #INDENT# pass