That subtract method is a class method now. So you don’t need to allocate the pathOperator but call the method on the class. (I’m not at the Mac right now, but it should be something like this:
At least the Paths line seems to give me an error. When I try layer.shapes for a path, or [s for s in layer.shapes if type(s) == GSPath], the path operator doesn’t subtract.
You need to use layer.shapes or build a new NSMutableArray as an argument for the GSPathOperator methods.
Layer.paths and Layer.components are proxies that can only be used to iterate only those objects.
Ah that’s where it was! I’ve finally got the resulting shape. Thanks!
My goal here is to update my scripts to G3, and this subtract paths is one of the obscure changes. I didn’t have to extract the resulting paths before, so it’s a new change, right?
While I am on the topic of boolean operations, from some version G3’s remove overlap behaviour has changed; if the original outline had an outside loop, Remove Overlap doesn’t remove them.