#NEWLINE# def get_chain( self , root , tip , joints = True , links = True , fixed = True ) : #NEWLINE# #INDENT# chain = [ ] #NEWLINE# if links : #NEWLINE# #INDENT# chain . append ( tip ) #NEWLINE# #UNINDENT# link = tip #NEWLINE# while ( link != root ) : #NEWLINE# #INDENT# ( joint , parent ) = self . parent_map [ link ] #NEWLINE# if joints : #NEWLINE# #INDENT# if ( fixed or ( self . joint_map [ joint ] . joint_type != 'fixed' ) ) : #NEWLINE# #INDENT# chain . append ( joint ) #NEWLINE# #UNINDENT# #UNINDENT# if links : #NEWLINE# #INDENT# chain . append ( parent ) #NEWLINE# #UNINDENT# link = parent #NEWLINE# #UNINDENT# chain . reverse ( ) #NEWLINE# return chain