IllustratorScripts for mobile graphic development

I’m putting together some scripts I use in Illustrator to help with mobile graphic development. First 2 I’m sharing are for android development.

create_android_artboards.js

This script is useful if you keep separate artboards per image per size. It will create a set of artboards at “bucket” size calculated from given base size at mdpi density bucket. Pick the name and size and your new set of artboards will be created below any other existing ones. The artboard name will be prefixed with appropriate prefix e.g. mdpi_ so you can’t use it in the given name, other prefixes are: “hdpi_”, “xhdpi_”, “xxhdpi_” and “xxxhdpi_”.

export_artboards_for_android.js

This is an exporter type script, it is used in conjunction with the create_android_artboards.js as it uses the naming convention from that script to create the PNG output. This scripts takes all artboards and export each to the proper “bucket” drawable folder e.g. Artboard names mdpi_ic_launch will be exported to the drawable-mdpi/ic_launch.png.

All those scripts are available on my GitHub.

You can install them by copying into the scripts folder in the default install location:
Illustrator CS5.1
C:\Program Files\Adobe\Adobe Illustrator CS5.1\Presets\en_GB\Scripts

64bit CS6 Illustrator the path looks like this:
C:\Program Files\Adobe\Adobe Illustrator CS6 (64 Bit)\Presets\en_GB\Scripts

as also described in this Stack Overflow answer.

This entry was posted in Illustrator-Scripting and tagged , , , , . Bookmark the permalink.