Glyphs-Scripts
Glyphs-Scripts copied to clipboard
New tab with modified glyphs not working in 3.4
Hello! I would like to use your fantastic script, but I encountered an error:
File "vanillaBase.py", line 539, in action_ self.callback(sender)
File "newTabModifiedGlyphs.py", line 44, in buttonCallback if glyph.lastChange > unixtime: ^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: '>' not supported between instances of 'NoneType' and 'float'
Hi! For some reason all glyphs are returning none when trying to get lastChange
@schriftgestalt do you know what can be causing this?
g.lastChange is None if it was never "changed", e.g. for new files. But also note that lastChange is not stored in glyphpackage files. So if you open a glyphspackage file, all lastChange is None.
Sorry, then it’s a situation at my end, because I’m using glyphspackage files (good for debugging too)
Oh right, I’m using glyphspackage too on most of my projects :/
g.lastChangeis None if it was never "changed", e.g. for new files. But also note that lastChange is not stored in glyphpackage files. So if you open a glyphspackage file, all lastChange is None.
If you have your .glyphspackage stored in a Git repository, you can use my Light Table plugin to open a new tab with the changed glyphs or layers:
These actions differ in that they are with respect to the last commit, not the last time you saved the document.
What do you mean by "modified glyphs". doesn’t it mean "since I opened the file"? Then you only need to add a check for None and it should work as before?