#NEWLINE# def nodeOrderedDataPackets( self , dagNode , onlyUnfulfilled = False , onlyFulfilled = False ) : #NEWLINE# #INDENT# '\n        Given a node, return which datapackets are povided to it, filtered by some flags.\n        Returns a list of tuples containing (Input, DataPacket).\n        ' #NEWLINE# validDataPackets = list ( ) #NEWLINE# orderedDataPackets = self . buildSceneGraph ( dagNode ) #NEWLINE# scenegraphInputAndConnectedNode = [ ( i , self . nodeInputComesFromNode ( dagNode , i ) [ 0 ] ) for i in dagNode . inputs ( ) ] #NEWLINE# for dataPacket in orderedDataPackets : #NEWLINE# #INDENT# if ( dataPacket . sourceNode is dagNode ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# if ( dataPacket . sourceNode not in [ i [ 1 ] for i in scenegraphInputAndConnectedNode ] ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# if ( onlyFulfilled and ( not dataPacket . dataPresent ( ) ) ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# if ( onlyUnfulfilled and dataPacket . dataPresent ( ) ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# input = None #NEWLINE# for i in scenegraphInputAndConnectedNode : #NEWLINE# #INDENT# if ( i [ 1 ] == dataPacket . sourceNode ) : #NEWLINE# #INDENT# input = i [ 0 ] #NEWLINE# #UNINDENT# #UNINDENT# validDataPackets . append ( ( input , dataPacket ) ) #NEWLINE# #UNINDENT# return validDataPackets