-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
delete path with del(Layer.paths[0])
not supported
#74
Comments
|
Thanks! Is there an easy way to distinguish between paths and components?
|
You can use |
Thanks! Should anyone add that to the Documentation? |
I linked to the documentation. Or what other documentation do you use? |
Didn’t see that it is a link. I also linked mine, though (twice 😉 ) # access all paths
for path in layer.paths:
print(path)
# delete path
del(layer.paths[0]) # <------------- this is what I am talking about.
# copy paths from another layer
import copy
layer.paths = copy.copy(anotherlayer.paths) |
Yes, that part is wrong. |
I’d love to help with the docu, but I have no access or clue how it is generated. Hence I can only drop all my findings here. |
The docu is generated from the comments in the wrapper file. It uses a script to extract the comments and then uses sphinx to build the html. https://github.com/schriftgestalt/GlyphsSDK/tree/Glyphs3/ObjectWrapper/Sphinx%20Documentation |
The formatting is a bit tricky (indentation and empty lines). I can clean it up if needed. |
>>> TypeError: 'GSProxyShapes' object doesn't support item deletion
The documentation claims that it is possible like that.
Also: what’s the proper API now to delete/add paths?
The text was updated successfully, but these errors were encountered: