Well, I programmed a script for doing this. It's pretty simple:
1 - Select a layer and then,( CMD + Shift + A ) and automatically generates this:
So you can export the layers really fast.
This is the code inside the .sketchplugin file I created (Copy and Paste it into a empty textFile and save it like exportPlugin.sketchplugin
Here is the code-->
// (shift cmd a)
if (selection.length() > 0){
for (var i=0; i < selection.length(); i++){
addExportSizes(selection[i])
}
[doc showMessage:"Export Options Added"]
}else{
var app = [NSApplication sharedApplication];
[app displayDialog:"Anything selected :(" withTitle:"Exportabler"];
}
function addExportSizes(layer){
var iOSExportData = [
{
"format": "png",
"scale": 1/3,
"suffix": ""
},
{
"format": "png",
"scale": 2/3,
"suffix": "@2x"
},
{
"format": "png",
"scale": 3/3,
"suffix": "@3x"
},
{
"format": "png",
"scale": 1/3,
"suffix": "mdpi"
},
{
"format": "png",
"scale": 1/2,
"suffix": "hdpi"
},
{
"format": "png",
"scale": 2/3,
"suffix": "xhdpi"
},
{
"format": "png",
"scale": 3/3,
"suffix": "xxhdpi"
}
]
var export_options = [layer exportOptions]
var export_sizes = [export_options sizes]
while([export_sizes count] > 0) {
[[export_sizes firstObject] remove]
}
for (var i = 0; i < iOSExportData.length; i++) {
var size_data = iOSExportData[i]
var size = [[layer exportOptions] addExportSize]
[size setFormat:size_data.format]
[size setScale:size_data.scale]
[size setName:size_data.suffix]
}
[[doc currentPage] deselectAllLayers]
[layer select:true byExpandingSelection:true]
}