equal
deleted
inserted
replaced
158 output.MoveConnected(exclude) |
158 output.MoveConnected(exclude) |
159 |
159 |
160 # Returns the block connector that starts with the point given if it exists |
160 # Returns the block connector that starts with the point given if it exists |
161 def GetConnector(self, position, name = None): |
161 def GetConnector(self, position, name = None): |
162 # if a name is given |
162 # if a name is given |
163 if name: |
163 if name is not None: |
164 # Test each input and output connector |
164 # Test each input and output connector |
165 for input in self.Inputs: |
165 #for input in self.Inputs: |
166 if name == input.GetName(): |
166 # if name == input.GetName(): |
167 return input |
167 # return input |
168 for output in self.Outputs: |
168 for output in self.Outputs: |
169 if name == output.GetName(): |
169 if name == output.GetName(): |
170 return output |
170 return output |
171 return self.FindNearestConnector(position, self.Inputs + self.Outputs) |
171 return self.FindNearestConnector(position, self.Inputs + self.Outputs) |
172 |
172 |
581 return None |
581 return None |
582 |
582 |
583 # Returns the block connector that starts with the point given if it exists |
583 # Returns the block connector that starts with the point given if it exists |
584 def GetConnector(self, position, name = None): |
584 def GetConnector(self, position, name = None): |
585 # if a name is given |
585 # if a name is given |
586 if name: |
586 if name is not None: |
587 # Test input and output connector if they exists |
587 # Test input and output connector if they exists |
588 if self.Input and name == self.Input.GetName(): |
588 #if self.Input and name == self.Input.GetName(): |
589 return self.Input |
589 # return self.Input |
590 if self.Output and name == self.Output.GetName(): |
590 if self.Output and name == self.Output.GetName(): |
591 return self.Output |
591 return self.Output |
592 connectors = [] |
592 connectors = [] |
593 # Test input connector if it exists |
593 # Test input connector if it exists |
594 if self.Input: |
594 if self.Input: |