myPaths = Layer.paths # also with `.__copy__()`
print myPaths
Layer.paths.append(myPaths)
fails:
layer.paths.append(myPath)
File "GlyphsApp/GlyphsApp/__init__.py", line 2181, in append
ValueError
Builds 1137 and 1139
Any ideas?
myPaths = Layer.paths # also with `.__copy__()`
print myPaths
Layer.paths.append(myPaths)
fails:
layer.paths.append(myPath)
File "GlyphsApp/GlyphsApp/__init__.py", line 2181, in append
ValueError
Builds 1137 and 1139
Any ideas?
You cannot append a list of paths. What you want is called .extend()
. Type help(list)
. and you will amongst other things see this:
| extend(...)
| L.extend(iterable) -- extend list by appending elements from the iterable
And you probably want to make a .copy()
of the paths before. You may end up iterating through your paths and do something like Layer.paths.append(myPath.copy())
The append method was wrong before. I fixed it and added the .extend() method.
true. But as Georg now wrote, it worked before
I dind’t make the copy here for the example. In real life I’m not even appending this layer’s paths
@mekkablue @GeorgSeifert Thanks for the quick feedback, I’ll change it now.