#NEWLINE# @ publisher ( [ 'animation' , 'shot previs' ] ) #NEWLINE# def set_frame_range( ) : #NEWLINE# #INDENT# 'sets the frame range from the shot node\n    ' #NEWLINE# shot_node = pm . ls ( type = 'shot' ) [ 0 ] #NEWLINE# start_frame = shot_node . startFrame . get ( ) #NEWLINE# end_frame = shot_node . endFrame . get ( ) #NEWLINE# handle_count = 1 #NEWLINE# try : #NEWLINE# #INDENT# handle_count = shot_node . getAttr ( 'handle' ) #NEWLINE# #UNINDENT# except AttributeError : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# pm . playbackOptions ( ast = handle_count , aet = end_frame , min = ( start_frame - handle_count ) , max = ( end_frame + handle_count ) )