equal
deleted
inserted
replaced
604 setattr(cls, "GetEnumeratedDataTypeValues", GetEnumeratedDataTypeValues) |
604 setattr(cls, "GetEnumeratedDataTypeValues", GetEnumeratedDataTypeValues) |
605 |
605 |
606 # Function that returns the block definition associated to the block type given |
606 # Function that returns the block definition associated to the block type given |
607 def GetCustomBlockType(self, type, inputs = None): |
607 def GetCustomBlockType(self, type, inputs = None): |
608 for customblocktype in self.CustomBlockTypes: |
608 for customblocktype in self.CustomBlockTypes: |
609 if inputs: |
609 if inputs is not None and inputs != "undefined": |
610 customblock_inputs = tuple([var_type for name, var_type, modifier in customblocktype["inputs"]]) |
610 customblock_inputs = tuple([var_type for name, var_type, modifier in customblocktype["inputs"]]) |
611 same_inputs = inputs == customblock_inputs |
611 same_inputs = inputs == customblock_inputs |
612 else: |
612 else: |
613 same_inputs = True |
613 same_inputs = True |
614 if customblocktype["name"] == type and same_inputs: |
614 if customblocktype["name"] == type and same_inputs: |