{"action":"created","issue":{"url":"https://api.github.com/repos/GeertWille/sketch-to-xcode-assets-catalog/issues/13","labels_url":"https://api.github.com/repos/GeertWille/sketch-to-xcode-assets-catalog/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/GeertWille/sketch-to-xcode-assets-catalog/issues/13/comments","events_url":"https://api.github.com/repos/GeertWille/sketch-to-xcode-assets-catalog/issues/13/events","html_url":"https://github.com/GeertWille/sketch-to-xcode-assets-catalog/issues/13","id":95377698,"number":13,"title":"Exporting slice layers yield empty images","user":{"login":"cmyk","id":62413,"avatar_url":"https://avatars.githubusercontent.com/u/62413?v=3","gravatar_id":"","url":"https://api.github.com/users/cmyk","html_url":"https://github.com/cmyk","followers_url":"https://api.github.com/users/cmyk/followers","following_url":"https://api.github.com/users/cmyk/following{/other_user}","gists_url":"https://api.github.com/users/cmyk/gists{/gist_id}","starred_url":"https://api.github.com/users/cmyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmyk/subscriptions","organizations_url":"https://api.github.com/users/cmyk/orgs","repos_url":"https://api.github.com/users/cmyk/repos","events_url":"https://api.github.com/users/cmyk/events{/privacy}","received_events_url":"https://api.github.com/users/cmyk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-16T08:16:58Z","updated_at":"2015-07-16T12:23:36Z","closed_at":null,"body":"The plugin doesn't export slice layers correctly. The images are blank.\r\nA normal sketch export, exports the same slice layers correctly.\r\n\r\nThe plugin only seems to work on group/object exports.\r\nI can send you a little sample file, if you want.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/GeertWille/sketch-to-xcode-assets-catalog/issues/comments/121942416","html_url":"https://github.com/GeertWille/sketch-to-xcode-assets-catalog/issues/13#issuecomment-121942416","issue_url":"https://api.github.com/repos/GeertWille/sketch-to-xcode-assets-catalog/issues/13","id":121942416,"user":{"login":"cmyk","id":62413,"avatar_url":"https://avatars.githubusercontent.com/u/62413?v=3","gravatar_id":"","url":"https://api.github.com/users/cmyk","html_url":"https://github.com/cmyk","followers_url":"https://api.github.com/users/cmyk/followers","following_url":"https://api.github.com/users/cmyk/following{/other_user}","gists_url":"https://api.github.com/users/cmyk/gists{/gist_id}","starred_url":"https://api.github.com/users/cmyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmyk/subscriptions","organizations_url":"https://api.github.com/users/cmyk/orgs","repos_url":"https://api.github.com/users/cmyk/repos","events_url":"https://api.github.com/users/cmyk/events{/privacy}","received_events_url":"https://api.github.com/users/cmyk/received_events","type":"User","site_admin":false},"created_at":"2015-07-16T12:23:36Z","updated_at":"2015-07-16T12:23:36Z","body":"Hi Geert,\n\nhere it is.\nWe actually fixed your script for the other issue I reported.\nhttps://github.com/GeertWille/sketch-to-xcode-assets-catalog/issues/14\n\n--- main.js\n+++ (clipboard)\n@@ -106,6 +106,8 @@\n             jsonPath     = '',\n             lineBuffer   = [];\n\n+//        com.geertwille.general.alert(\"Path\"+cutSliceName);\n+\n         // Find out our extension to save image with\n         if (fileType == \"j_\") {\n             imageExtension = \".jpg\";\n@@ -132,12 +134,13 @@\n\n         // Loop over all the factors and save the lines to a lineBuffer\narray\n         for (var i = 0; i < this.factors.length; i++) {\n+ var fileName = sliceName.trim().substring(sliceName.lastIndexOf('/')+1);\n             var name         = this.factors[i].folder,\n             scale            = this.factors[i].scale,\n             suffix           = this.factors[i].suffix,\n             version          = this.copyLayerWithFactor(slice, scale),\n-            relativeFileName = cutSliceName + suffix + imageExtension,\n-            absoluteFileName = this.baseDir + \"/\" +\nthis.defaultAssetFolder + \"/\" + cutSliceName + \".imageset/\" + cutSliceName\n+ suffix + imageExtension;\n+            relativeFileName = fileName + suffix + imageExtension,\n+            absoluteFileName = this.baseDir + \"/\" +\nthis.defaultAssetFolder + \"/\" + cutSliceName + \".imageset/\" + fileName +\nsuffix + imageExtension;\n\n             [doc saveArtboardOrSlice:version toFile:absoluteFileName];\n\n\nCheers\nPhilipp\n\n\n\n\nSichtwerk AG\nGaiserstrasse 16\n9050 Appenzell\nSwitzerland\n\np  +41 71 780 15 51\nm +41 79 750 87 74\n\nhttp://www.sichtwerk.com\n\n\nOn Thu, Jul 16, 2015 at 1:44 PM, Geert Wille <notifications@github.com>\nwrote:\n\n> Yes please attach an example sketch file [image: :smiley:] I still need\n> to update this plugin... Hopefully I can find some time in the near future.\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/GeertWille/sketch-to-xcode-assets-catalog/issues/13#issuecomment-121933019>\n> .\n>\n"}}