Shadow script or similar

For Boolean operations, you need to set up a GSPathOperator instance:

pathOp = GSPathOperator.alloc().init()

Then you need define lists of paths, e.g., like this:

thisLayer = Font.selectedLayers[0]
p1 = thisLayer.paths[0]
p2 = thisLayer.paths[1]
p3 = thisLayer.paths[2]
thePaths = [p1,p2]
otherPaths = [p3]

Then you do any of these boolean operations:

pathOp.removeOverlapPaths_error_( thePaths, None)
pathOp.subtractPaths_from_error_( otherPaths, thePaths, None )
pathOp.intersectPaths_from_error_( otherPaths, thePaths, None )

The result will be stored in thePaths. You can iterate through it, and add paths to a layer with myLayer.addPath_( myPath ).

1 Like