equal
deleted
inserted
replaced
570 return self.Output |
570 return self.Output |
571 return None |
571 return None |
572 |
572 |
573 # Returns all the block connectors |
573 # Returns all the block connectors |
574 def GetConnectors(self): |
574 def GetConnectors(self): |
575 return {"input" : self.Input, "output" : self.Output} |
575 connectors = {"inputs": [], "outputs": []} |
|
576 if self.Input: |
|
577 connectors["inputs"].append(self.Input) |
|
578 if self.Output: |
|
579 connectors["outputs"].append(self.Output) |
|
580 return connectors |
576 |
581 |
577 # Changes the negated property of the variable connector if handled |
582 # Changes the negated property of the variable connector if handled |
578 def SetConnectorNegated(self, negated): |
583 def SetConnectorNegated(self, negated): |
579 handle_type, handle = self.Handle |
584 handle_type, handle = self.Handle |
580 if handle_type == HANDLE_CONNECTOR: |
585 if handle_type == HANDLE_CONNECTOR: |
783 |
788 |
784 # Returns the connection connector |
789 # Returns the connection connector |
785 def GetConnector(self, position = None, name = None): |
790 def GetConnector(self, position = None, name = None): |
786 return self.Connector |
791 return self.Connector |
787 |
792 |
|
793 # Returns all the block connectors |
|
794 def GetConnectors(self): |
|
795 connectors = {"inputs": [], "outputs": []} |
|
796 if self.Type == CONNECTOR: |
|
797 connectors["inputs"].append(self.Connector) |
|
798 else: |
|
799 connectors["outputs"].append(self.Connector) |
|
800 return connectors |
|
801 |
788 # Changes the variable type |
802 # Changes the variable type |
789 def SetType(self, type): |
803 def SetType(self, type): |
790 if type != self.Type: |
804 if type != self.Type: |
791 self.Type = type |
805 self.Type = type |
792 self.Clean() |
806 self.Clean() |