Closed Lowrenz closed 5 years ago
Getting these errors in the console.
TypeError: app.globalAssets is not a function. (In 'app.globalAssets()', 'app.globalAssets' is undefined)
line: 368
TypeError: assets.addColors is not a function. (In 'assets.addColors(colors)', 'assets.addColors' is undefined)
line: 372
Currently trying to figure out what changed in their API.
I was able to figure out how to fix loading, saving and clearing document colors. However, I noticed that app.globalColors()
has been removed. So adding colors + gradients on a global level is not yet fixed.
@mathieudutour I noticed your comments on another repo, maybe you know how we can access global assets.
I do :)
MSPersistentAssetCollection.sharedGlobalAssets().colorAssets()
Have a look here
@mathieudutour Amazing, thanks! I was looking at MSPersistentAssetCollection
in the sketch headers repo but simply didn't make the link it was accessible through this.
So I've updated my pull request, this basically fixes the functionality as is. There is no support for storing the names of the colors + gradients since this will require a change in how we store the information.
This is now fixed. Thanks everyone!
Sketch introduced a new way of displaying colors. Since the update, loading / importing Sketch Palettes doesn't work anymore.