I’m looking for a way to use the Transformations filter in a script, more precisely the Background option.
For now, I’m calling it like this:
transformFilterClass = NSClassFromString("Transformations")
transformFilter = transformFilterClass.alloc().init()
transformFilter.runFilterWithLayer_error_(layer,None )
This is working, except it opens the Transformations panel and I have to press ok for the script to continues to its next task. I can’t find how to just run the filter. I looked at some of @mekkablue’s plugins that use the offset curve filter where I see stuff like this:
def offsetLayer( thisLayer, offset, offset2, makeStroke=False, position=0.5, autoStroke=False ):
offsetFilter = NSClassFromString("GlyphsFilterOffsetCurve")
offsetFilter.offsetLayer_offsetX_offsetY_makeStroke_autoStroke_position_error_shadow_(
thisLayer,
offset, offset2,
makeStroke,
autoStroke,
position,
None, None )
But I can’t find offsetLayer_offsetX_offsetY_makeStroke_autoStroke_position_error_shadow_() when looking at the methods available for NSClassFromString(“GlyphsFilterOffsetCurve”), I have no clue on how to set up the Transformations filter this way? I don’t find any such method when looking at NSClassFromString(“Transformations”). Where can I look?