Set all paths to the same direction

Hi, Glyphs forum!

Does anyone have an idea of a way to set all paths to the same direction?
Not like ‘Correct Path Direction’, but really set all paths in a glyph to one direction (eg. clockwise)

Thank you all in advance!

That could be done with a small script:

reqiredDirection = -1 # CCW = -1, CW = 1
for p in Layer.paths:
	if p.direction != reqiredDirection:

Hi @GeorgSeifert
Thank you so so much! This works wonders!

May I ask you a version that would do it for all the masters?

Thank you again

requiredDirection = -1 # CCW = -1, CW = 1
for l in Font.selectedLayers:
	g = l.parent # glyph
	for glyphlayer in g.layers:
		for p in glyphlayer.paths:
			if p.direction != requiredDirection:
1 Like

Amazing! :fire:

Thank you so much @mekkablue

Hello, is there a way to use this script as custom parameter?

What kind of workflow do you have that you would need that?