Hi,
I’m new to scripting and I’m trying to create a very simple one that locks the “zoom”. The script works only when I execute it in the macro panel but stops, even if I added a callback.
def setscale(v):
if Glyphs.font.currentTab.scale != v:
Glyphs.currentDocument.windowController().activeEditViewController().graphicView().zoomViewToAbsoluteScale_(v)
Glyphs.addCallback(setscale(0.05), MOUSEMOVED)
What I wanted is to disable temporarily the ability to zoom, locking it to a defined number. I’m experimenting with a new workflow that limits some aspects of the software, to be forced to judge the shapes in a smaller size. It doesn’t have to be updated when I move the mouse. Do you think of another possible solution, or do you think like this it is possible?
Thanks!