#NEWLINE# def link_to_active( mode , context ) : #NEWLINE# #INDENT# obj = ob . active_object #NEWLINE# obs = context . selected_objects #NEWLINE# if ( 'NLA' in mode ) : #NEWLINE# #INDENT# if ( 'SHAPE_KEYS' in mode ) : #NEWLINE# #INDENT# obj_strip = obj . data . shape_keys . animation_data . nla_tracks [ 0 ] . strips [ 0 ] #NEWLINE# for ob in obs : #NEWLINE# #INDENT# ob_strip = ob . data . shape_keys . animation_data . nla_tracks [ 0 ] . strips [ 0 ] #NEWLINE# link_strips ( obj_strip , ob_strip ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( 'OBJECT' in mode ) : #NEWLINE# #INDENT# obj_strip = obj . animation_data . nla_tracks [ 0 ] . strips [ 0 ] #NEWLINE# for ob in obs : #NEWLINE# #INDENT# ob_strip = ob . animation_data . nla_tracks [ 0 ] . strips [ 0 ] #NEWLINE# link_strips ( obj_strip , ob_strip ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( 'FCURVES' in mode ) : #NEWLINE# #INDENT# if ( 'SHAPE_KEYS' in mode ) : #NEWLINE# #INDENT# action = obj . data . shape_keys . animation_data . action #NEWLINE# for ob in obs : #NEWLINE# #INDENT# if ob . data . shape_keys . animation_data : #NEWLINE# #INDENT# ob . data . shape_keys . animation_data . action = action #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# ob . data . shape_keys . animation_data_create ( ) #NEWLINE# ob . data . shape_keys . animation_data . action = action #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( 'OBJECT' in mode ) : #NEWLINE# #INDENT# action = obj . animation_data . action #NEWLINE# for ob in obs : #NEWLINE# #INDENT# if ob . animation_data : #NEWLINE# #INDENT# ob . animation_data . action = action #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# ob . animation_data_create ( ) #NEWLINE# ob . animation_data . action = action