#NEWLINE# def get_hud_data( self ) : #NEWLINE# #INDENT# '\n        ' #NEWLINE# current_shot = pm . sequenceManager ( q = 1 , currentShot = 1 ) #NEWLINE# if ( not current_shot ) : #NEWLINE# #INDENT# return '' #NEWLINE# #UNINDENT# shot_name = pm . getAttr ( ( '%s.shotName' % current_shot ) ) #NEWLINE# current_cam_name = pm . shot ( current_shot , q = 1 , cc = 1 ) #NEWLINE# current_cam = pm . PyNode ( current_cam_name ) #NEWLINE# if isinstance ( current_cam , pm . nt . Transform ) : #NEWLINE# #INDENT# current_cam = current_cam . getShape ( ) #NEWLINE# #UNINDENT# focal_length = current_cam . getAttr ( 'focalLength' ) #NEWLINE# sequencer = pm . ls ( type = 'sequencer' ) [ 0 ] #NEWLINE# if ( sequencer . getAttr ( 'sequence_name' ) != '' ) : #NEWLINE# #INDENT# shot_info = sequencer . getAttr ( 'sequence_name' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# shot_info = 'INVALID' #NEWLINE# #UNINDENT# cf = ( pm . currentTime ( q = 1 ) + 1 ) #NEWLINE# import timecode #NEWLINE# tc = timecode . Timecode ( '24' , frames = cf ) #NEWLINE# start_time = pm . shot ( current_shot , q = 1 , st = 1 ) #NEWLINE# end_time = pm . shot ( current_shot , q = 1 , et = 1 ) #NEWLINE# cs_frame = int ( ( cf - start_time ) ) #NEWLINE# length = ( int ( ( end_time - start_time ) ) + 1 ) #NEWLINE# user_name = self . version . updated_by . name #NEWLINE# hud_string = ( '%s | %s:%smm | tc:%s [%s] | Shot: %s | Length: %s/%sfr | [%s]' % ( shot_info , current_cam . split ( ':' ) [ ( - 1 ) ] , int ( focal_length ) , tc , str ( ( int ( cf ) - 1 ) ) . zfill ( 4 ) , shot_name . split ( ':' ) [ ( - 1 ) ] , cs_frame , str ( length ) . zfill ( 3 ) , user_name ) ) #NEWLINE# return hud_string