28 Aug 2016 photoshop
Set of the scripts for quick save texture maps or other images from PSD-file without any setup and questions.
The set includes three versions of the same script to output files in different formats: TGA, PNG and JPG.
The principle is very simple: the script makes a sequential pass through by the all visible top-level layer groups, hiding them one by one, and save all workspace into the file. In the end, the visibility of the groups will be restored to the original state.
The mechanism assumes that the contents of each group should completely fill the canvas.
TGA version the fastest and useful (4340 ms) – files in 24bits (no alpha).
PNG can be used if necessary, but it works much more slowly (7398 ms) – uses standard Photoshop export options.
JPG additional for other needs – 10 Quality, Baseline (“Standard”) format.
The names of the output files will be generated from the name of the original PSD-file and the appropriate groups, as a suffix. For example, [psd_file_name]_[group_name].tga. This means that you can put any structure of output files in the source code.
To quickly launch the script recommend assign hotkeys. In my case it’s F5, F6 and F7 for TGA, PNG and JPG respectively (a full list of my hotkeys, you can find here).
Example of using can be found in DOTA2 Texture Guide.