disable/enable tool without deleting/installing extensions?
RafaŁ Buchner last edited by gferreira
As in the topic:
Is it possible to enable/disable the tool by code without deleting/installing the extension? Is there a list of available tools that are waiting to be activated or deactivated?
It would be wonderful for me :D
have a look at the
does this solve your problem?
RafaŁ Buchner last edited by
Btw: is it possible to load the list of tool objects, that are appearing in glyph window toolbar without opening glyph window?
right now in order to get those tools, I'm creating an observer for glyphWindowDidOpen event. So the list
self.toolsis created when the glyph window is opened for the first time. I'm doing it because I don't know the other way of getting tool objects than
def glyphWindowDidOpenCallback(self, info): toolNames = getToolOrder() currentToolName = getActiveEventTool().__class__.__name__ # populating self.tools list for toolName in toolNames: setActiveEventTool(toolName) toolObj = getActiveEventTool() self.tools += [toolObj] # Resetting the tool, to the one that was active before th loop setActiveEventTool(currTool) removeObserver(self, 'glyphWindowDidOpen')
Why do you need those tool objects? Im trying to understand your question ;)