Hi! Is there a built-in way to keep the angle of the “smooth” nodes, if the relative offcurve is moved with a code? Thank you!
I think you might need to tress the Option key while moving the off curve node.
Oh, sorry, I meant if you move one “smooth” off-curve with a script, is there a way to update the position of the other one accordingly? Maybe somehow trigger the update that happens in the select tool?
Ok I didn’t see the script tag.
Does this help?
nodes = Layer.shapes.nodes print(nodes) nodes.x = 300 Layer.shapes.setSmooth_withCenterNode_oppositeNode_(nodes, nodes, nodes)
The path looks like this:
( <GSNode 0x60000a730660> 675 25 OFFCURVE, <GSNode 0x60000a730f00> 812 163 OFFCURVE, <GSNode 0x60000a730600> 812 334 CURVE SMOOTH, <GSNode 0x60000a732340> 812 505 OFFCURVE, <GSNode 0x60000a733f60> 675 643 OFFCURVE, <GSNode 0x60000a730d80> 507 643 CURVE SMOOTH, <GSNode 0x60000a731560> 338 643 OFFCURVE, <GSNode 0x60000a733c00> 201 505 OFFCURVE, <GSNode 0x60000a731680> 201 334 CURVE SMOOTH, <GSNode 0x60000a7315c0> 201 163 OFFCURVE, <GSNode 0x60000a731500> 338 25 OFFCURVE, <GSNode 0x60000a730360> 507 25 CURVE SMOOTH )
Yes, that’s perfect, thank you!