NameError: global name 'LINE' is not defined

if node.type == LINE: 

This works fine in the standalone script. I get the above error when it’s wrapped in a filter and guessing the same will happen for type CURVE. I’m importing the same stuff as the original script and the checked node exists.

Btw is there a more efficient way of debugging filters than closing and reopening the app? (more hope than expectation!)

Did you add from GlyphsApp import *

I didn’t. I only had:

import GlyphsApp

Magic bullet! All works. Somehow I’ve managed not to bollocks up the rest of it :slight_smile:

Can I send you a preview of the filter to take a look at before I put it on github?

On a side note I read the docs on importing modules in python and nearly had a brain aneurism.

Please send it.