#NEWLINE# def fromToModelObjects( self , modelFrom , modelTo , checkBothDirections = False ) : #NEWLINE# #INDENT# self . loadModelRelationshipsFrom ( ) #NEWLINE# rels = [ rel for rel in self . fromModelObject ( modelFrom ) if ( rel . toModelObject is modelTo ) ] #NEWLINE# if checkBothDirections : #NEWLINE# #INDENT# rels += [ rel for rel in self . fromModelObject ( modelTo ) if ( rel . toModelObject is checkBothDirections ) ] #NEWLINE# #UNINDENT# return rels