Comments (10)
del(Layer.shapes[0])
from glyphssdk.
Thanks!
Is there an easy way to distinguish between paths and components?
When a user wants to only delete either or.
I know one could type check as on objc, but for the regular python user? It’s not all too clear with the .shapes
I think.
- The documentation needs an update then.
del(layer.paths[0])
→del(Layer.shapes[0])
from glyphssdk.
You can use shapeType
.
from glyphssdk.
Thanks!
Should anyone add that to the Documentation?
from glyphssdk.
I linked to the documentation. Or what other documentation do you use?
from glyphssdk.
Didn’t see that it is a link. I also linked mine, though (twice
Tried to point y’all to the part under GSLayer > paths, where it says:
# 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)
from glyphssdk.
Yes, that part is wrong.
from glyphssdk.
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.
from glyphssdk.
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
from glyphssdk.
The formatting is a bit tricky (indentation and empty lines). I can clean it up if needed.
from glyphssdk.
Related Issues (20)
- NSAffineTransform not available by default HOT 1
- `needsExtraMainOutlineDrawingForActiveLayer` does not yet hide corner/cap components
- Can’t access `self.windowController()` from GeneralPlugin (Python) HOT 2
- Python + XIB: Can’t make connections with Xcode 13 HOT 4
- Cap component “fit”
- TypeError: 'GSProxyShapes' object doesn't support item deletion
- Documentation: `GSAxis` > `axisId` wrongly attributed as `id` HOT 2
- Wrapper: missing things (WIP) HOT 3
- Documentation: miscellaneous (WIP) HOT 2
- GSLayer: `.reinterpolate()` only possible in UI? HOT 2
- GSLayer: `connectAllOpenPaths()` does nothing
- GSFont: `save()` issues HOT 1
- Provide test glyphs files which exercise all Glyphs functionality HOT 1
- We need a named constant for 9223372036854775808 HOT 8
- GSFilterPlugin: template misses `[super setup]` call HOT 1
- align="topleft" seem to not work with self.drawTextAtPoint() HOT 3
- How was the. xib file created and in what language was it written. HOT 1
- Do I need to use object-c language to write practical Python templates for glyphs? Can I just use Python language to create plugins HOT 1
- Compiler xib exécuter ibtool xxx.xib - - compile xxx.nib erreur de Times: HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from glyphssdk.