zmalltalker / sketch-android-assets

Generate Android assets in Sketch
GNU General Public License v3.0
356 stars 55 forks source link

Plugin isn't working properly in Sketch 3.4 #31

Closed arisawyers closed 9 years ago

arisawyers commented 9 years ago

Hey @zmalltalker I use this plugin every day, it's quite useful :smile:

Unfortunately it's not working properly in Sketch 3.4 – all of my assets are larger than they should be. For instance, a 96 x 96 asset has turned into a 481 × 145 asset somehow. Hopefully you can fix it soon!

ksoon26 commented 9 years ago

Can confirm, I'm having the same exact issue when attempting to export.

martinboerma commented 9 years ago

Also the export is not restricted to the selected layer(group). It exports the underlaying layers as well.

Cheers, Martin

maznazemi commented 9 years ago

This is one of the best plugins on Sketch3. Same problem here. Please fix it. Many thanks

zmalltalker commented 9 years ago

I've tried to find a changelog about the changes in Sketch 3.4 but haven't found anything yet. Has anybody seen such a thing?

arisawyers commented 9 years ago

@zmalltalker this is the changelog available on their website: http://sketchapp.com/support/updates/sketch-3.4/

zmalltalker commented 9 years ago

Thanks @arisawyers, but I'm afraid that doesn't say much about the API changes. Their developer site has a changelog available for developers, but that hasn't been updated since 3.3: http://sketchapp.com/support/developer/03-reference/00.html

mohnazemi commented 9 years ago

@zmalltalker Please check this out https://sketchplugindev.james.ooo/undocumented-sketch-plugin-api-reference-642775b6476d He thinks it will be possible to figure out the undocumented API chnages by looking at the Sketch app headers. The 3.4 headers seem to be exported and are now available in a repository, see https://github.com/abynim/Sketch-Headers/

joaoramos commented 9 years ago

I also confirm this behaviour, with pretty much every single export Sketch plugin. All of them seem to be exporting larger assets than they should.

maznazemi commented 9 years ago

The version 3.4.1 is available on https://t.co/fARtVyTCVh Bohemian Coding said it will sort out most of the problems including issues with plugins not working. Currently they are waiting for their app to be reviewed by Apple and soon we all be able to update. It was submitted on November 4th so it is expected to be available on AppStore from 12th Novemebr onwards (depending on the volume of apps to be reviewed by apple)

taylorling commented 9 years ago

I am on 3.4.2 right now and the plugin remains broken. Any chance @zmalltalker can look into it?

alex2web commented 9 years ago

Same here :(

bomberstudios commented 9 years ago

Can anybody here provide an example doc with detailed steps to make it fail?

I just tried here and it seems to be working as expected, so I'm probably missing some information.

Thanks in advance!

maznazemi commented 9 years ago

1) Your sketch version needs to be 3.4 or 3.4.1 or 3.4.2 2) Select any square ArtBoard and use the plugin to generate the relevant assets 3) check the assets dimension and you will see the height is bigger than width

If you get the exact same size as the artboard let us know.

arisawyers commented 9 years ago

I found a workaround to the problem (it requires an extra step):

taylorling commented 9 years ago

@bomberstudios I second what was mentioned by @maznazemi. That's my usually workflow for asset generation, a new artboard for the asset, put in the artwork, select the artboard, export using the plugin - job done. It was working fine in 3.3 :)

bomberstudios commented 9 years ago

Thanks @maznazemi, can definitely replicate it here, now let's see what's going on : )

maznazemi commented 9 years ago

I can confirm the new commit solved the dimension issue but it does not generate the assets in 1x 1.5x 2x , 3x and 4x. Can some of you try the new commit and let me know please ?

For your information, I have tried to export a 100x100 square artborad but what i ended up with is 100x100px in all mdpi,hdpi,xhdpi,xxhdpi and xxhdpi assets

bomberstudios commented 9 years ago

ah, you're right, totally missed that!

Back to the drawing board : )

bomberstudios commented 9 years ago

It now works as expected (sorry for missing that part!)

arisawyers commented 9 years ago

thanks so much for fixing this @bomberstudios!

Victa commented 9 years ago

Thanks guys :+1:

maznazemi commented 9 years ago

Thanks @bomberstudios
The plugin is now working fine again.

zmalltalker commented 9 years ago

Second that. Thanks so much @bomberstudios for helping out here!

bomberstudios commented 9 years ago

Just a quick note to let you know that https://github.com/zmalltalker/sketch-android-assets/pull/35 fixes a bug in my fix (it never ends! : )

taylorling commented 9 years ago

@bomberstudios Thanks for fixing this!