This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ChangeColor.jsx | |
// | |
// This photoshop script finds all shape and solid fill layers that match the color | |
// of the currently selected shape/fill layer and changes their color to the | |
// foreground color. | |
// | |
// Tested on Adobe Photoshop CS4 (Mac) | |
// enable double clicking from the Macintosh Finder or the Windows Explorer | |
#target photoshop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// MultiExporter.jsx | |
// Version 0.1 | |
// Version 0.2 Adds PNG and EPS exports | |
// Version 0.3 Adds support for exporting at different resolutions | |
// Version 0.4 Adds support for SVG, changed EPS behaviour to minimise output filesize | |
// Version 0.5 Fixed cropping issues | |
// Version 0.6 Added inner padding mode to prevent circular bounds clipping | |
// | |
// Copyright 2013 Tom Byrne | |
// Comments or suggestions to [email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#target "photoshop" | |
var outputWidth = 1024; | |
var inputFolder = Folder.selectDialog("Input folder"); | |
var outputFolder = Folder.selectDialog("Output folder"); | |
if (inputFolder != null && outputFolder != null) { | |
var files = inputFolder.getFiles("*.psd"); | |
for (var i = 0; i < files.length; i++) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* FUNCS */ | |
function move(l,x,y) { | |
var Position = l.bounds; | |
Position[0] = x - Position[0]; | |
Position[1] = y - Position[1]; | |
l.translate(-Position[0],-Position[1]); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#target photoshop | |
var currentDoc = app.activeDocument; | |
for ( var i = 0; i < currentDoc.layers.length; i++ ) { | |
var layer = currentDoc.layers[i]; | |
if( layer.kind === LayerKind.HUESATURATION ) | |
{ | |
layer.visible = layer.visible ? false : true; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Install by saving to PHOTOSHOP_DIRECTORY/Presets/Scripts | |
// Also works just by opening it with File->Open.. | |
// Once installed, you can add an action to run it with a keyboard shortcut | |
// Open Actions window (Window->Actions) | |
// Click the "Create a New Action" Button (dog-eared paper icon) | |
// Choose the name of the action and the shortcut keys you want | |
// Click Record | |
// Select Insert Menu Item... | |
// Select File->Scripts->toggleLayerType |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
main(); | |
function main(){ | |
var doc = activeDocument; | |
var docPath = activeDocument.path; | |
var marketApps = doc.layerSets.getByName("Group Name"); | |
for(var a=0; a<marketApps.layers.length; a++){ | |
//alert(marketApps.layers[a]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
The original files are 960x319. | |
Image sizes to save: | |
* 800x266 - Retina for 480x320 resolution (400 logical pixel wide panel areas) | |
* 740x246 - Desktop and iPad | |
* 616x205 - Retina for 320x480 resolution (308 logical pixel wide panel areas) | |
* 400x133 - 480x320 resolution | |
* 308x102 - 320x480 resolution |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.activeDocument.suspendHistory("Export as png", "main()"); | |
function main() { | |
if (app.documents.length) { | |
var docRef = app.activeDocument; | |
if (docRef.layers.length) { | |
var selected = getSelectedLayersIdx(); | |
for (var i = 0; i < selected.length; i++) { | |
var layer = selectByIndex(selected[i]), | |
width = layer.bounds[2] - layer.bounds[0], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*Maximum spriteSheet width -> FIXED*/ | |
var maxWidth = 256; | |
var filename = activeDocument.name.replace(".psd",""); | |
var file = new File(activeDocument.fullName.path+"/"+filename+".xml"); | |
var AD = activeDocument; | |
var output = new File(activeDocument.fullName.path+"/"+filename+".png"); | |
var pngOptions = new PNGSaveOptions(); |
NewerOlder