How to add corner components on GSHandle by script?

How to add corner components on GSHandle? The following script shows that the added corner component is not in this GSHandle, it at the origin.

tool = Font.parent.windowController().toolEventDelegate()
for handle in tool.currentTool().extraHandles():
    corner = GSHint()
    corner.name='_corner.abc'
    corner.type = CORNER
    corner.originNode = handle
    Layer.hints.append(corner)

Even if executed
Layer.setExtraHandles_(tool.currentTool().extraHandles())
it not successful either.

Second this. I need to know how to do it.
GSlayer.intersecttions() doesn’t give me handles, and even if I select it in select tool to get the info, the resulting corner component returns None for originNode.

corner = GSHint()
node = Layer.shapes[0].nodes[0]
corner.name = '_corner.abc'
corner.type = CORNER
corner.stem = 1004 # or 1005 for the other directiton
corner.originNode = node
Layer.hints.append(corner)

the corner is attached to the regular node but by setting the stem to 1004 or 1005 it uses the offsetted point.

1 Like