def setupBrushModes(self):
        """
        Makes a dictionary of all mode names and their corresponding module. If no name is found, it uses the name of the file.
        Creates dictionary entries for all inputs in import brush modules.
        Called by toolSelected
        """
        self.importedBrushModes = self.importBrushModes()
        for m in self.importedBrushModes:
            if m.displayName:
                if hasattr(m, "trn"):
                    displayName = m.trn._(m.displayName)
                else:
                    displayName = _(m.displayName)
                self.brushModes[displayName] = m
            else:
                self.brushModes[m.__name__] = m
            if m.inputs:
                for r in m.inputs:
                    for key in r:
                        if not hasattr(self.options, key):
                            if isinstance(r[key], tuple):
                                self.options[key] = r[key][0]
                            elif not isinstance(r[key], str):
                                self.options[key] = r[key]
            if not hasattr(self.options, 'Minimum Spacing'):
                self.options['Minimum Spacing'] = 1
        self.renderedBlock = None

        Makes a dictionary of all mode names and their corresponding module. If no name is found, it uses the name of the file.
        Creates dictionary entries for all inputs in import brush modules.
        Called by toolSelected
        
editortools/brush.py