#NEWLINE# def _alphas_layers_to_controls( self ) : #NEWLINE# #INDENT# self . logger . debug ( ( 'updating controls from %s' % self . limage ) ) #NEWLINE# num_layers = self . limage . num_layers ( ) #NEWLINE# for i in range ( num_layers ) : #NEWLINE# #INDENT# layer = self . limage . get_layer ( i ) #NEWLINE# self . logger . debug ( ( '%d: alpha=%f' % ( i , layer . alpha ) ) ) #NEWLINE# ctrlname = ( 'layer_%d' % i ) #NEWLINE# if ( ctrlname in self . w ) : #NEWLINE# #INDENT# self . w [ ctrlname ] . set_value ( ( num_layers . alpha * 100.0 ) ) #NEWLINE# #UNINDENT# i += 1