Draw in the editview (not foreground) with a script

I’m wondering if there is a way to draw in the edit view with a simple python script (without creating a plugin)? My preview code is working in Skedge, but the preview is not visible when being used as a script.
It would be great!

You can add a callback from a script. Glyphs.app Python Scripting API Documentation — Glyphs.app Python Scripting API 3.0 documentation

1 Like

Thanks, I never fully understood what those callbacks were, now it all makes sense!

One last question about this:
How to clear the editview afterward?
Removing the callback doesn’t do it.

Never mind, I found the problem. I didn’t empty my variable so my path was drawn a last time before closing the window.