I’ve been looking in the documentation but can’t find something that would let me know what editor tool is currently active. I’d like my plugin to behave different (not trigger) for certain tools. I’m using the DRAWFOREGROUND callback.
this looks very much like what I need, but I’m not sure is it because I’m using a GeneralPlugin instead of a ReporterPlugin or because I am registering the callback differently that the self.controller seems to return something different.
I use Glyphs.addCallback(self.keepGlyphCenter, DRAWFOREGROUND) to listen for the updates, and in the callback “keepGlyphCenter” self.controller seems to be that very method itself.
How do you find out more about those under-the-surface bindings of Glyphs? I constantly seem to bang my head against a glass ceiling whenever I try anything past the documented API.
This seems a more general way of getting the current tab’s selected tool without the correct “self” context Glyphs.fonts[0].currentTab.graphicView().window().windowController().toolDrawDelegate()
Also using print dir(whatever) in the Macro panel seems to expose some of the underlying bindings and methods of those black box objects.