nicolajbak
(Nicolaj Bak)
1
Hi there,
To asure compatibility across masters I need to add an extra node to curves in some masters, one point away from another node.
I’ve tried the insertNodeWithPathTime_ method, but for that I need to know the exact pathtime.
Is there a way to achieve this?
you can use
(nearestPoint, pathTime) = path.nearestPointOnPath_pathTime_(point, None)
But I would just add another point with he same coordinates as the curve point.
curveNode = Layer.selection[0]
index = curveNode.index
newNode = GSNode(curveNode.position)
curveNode.parent.nodes.insert(index + 1, newNode)
nicolajbak
(Nicolaj Bak)
3
Thanks a lot @GeorgSeifert!
I did think about using the second solution. Are there no rendering issues, with 2 nodes in the same coordinates?
Probably not. But if you are like to be sure, move the point by one unit. I would not change the off-curve nodes.
nicolajbak
(Nicolaj Bak)
5
Thanks a lot for the help. Really appreciate it!