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
var DocumentArea = function(doc) { | |
this.doc = doc; | |
}; | |
DocumentArea.prototype.bounds = function() { | |
return [0, 0, this.doc.width, this.doc.height]; | |
}; | |
var DocumentArea = function(doc) { | |
this.doc = doc; |
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
/** | |
* Photoshop script for preparing a sprite for rotating animation. | |
* Input : a starting sprite and number of frames | |
* Output: the specified number of layers ready to be used in the PS animation tool | |
*/ | |
var docRef = app.activeDocument; | |
var activeLayer = docRef.activeLayer; | |
var degToRotate = null; | |
var newLayer = null; |
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
access_token:="" ;Your Github access token goes here if you want to publish it to your Gist list | |
info:="Code to post goes here" ;Change this to create the new text for the Gist | |
filename:="mygit.txt" ;change this to whatever you want your file name to be | |
desc:="my description" ;This is where you would have a description for your Gist | |
post_gist(info,access_token,filename,desc) | |
return |
This file has been truncated, but you can view the full file.
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
# Add this file to your /etc/hosts to block all | |
# of the ad sites, porn and general junk on this | |
# list, including Google. | |
# | |
# Fell free to add or subtract sites as necessary. | |
# | |
# For linux noobs, to add this to /etc/hosts, | |
# run the following in the same directory of this | |
# file: | |
# |
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
var layerNum = app.activeDocument.layers.length; | |
var a = []; | |
for (var i = 0; i < layerNum; i++) { | |
a[i] = '"' + app.activeDocument.layers[i].name + '"'; | |
} | |
prompt("Layers Names:", 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
// 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 tom@tbyrne.org |
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
/*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(); |
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
//This will be the direcotry of the images | |
var workFolder = Folder("Z:/Bermudez-Hernandez/Strains Project/Animals/C57_20/Prox1_NeuN/Slide2"); | |
var folders = workFolder.getFiles(); | |
runphotomergeFromScript = true; | |
//runphotomergeFromScript = true; | |
$.evalFile( "C:/Program Files/Adobe/Adobe Photoshop CC/Presets/Scripts/Photomerge.jsx") | |
//photomerge.createPanorama( | |
//fileList, displayDialog ); | |
psdOpts = new PhotoshopSaveOptions(); |
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]); |