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
// change color mode of document in photoshop | |
// http://ps-scripts.com/bb/viewtopic.php?f=9&t=3158&start=0 | |
var doc = activeDocument; | |
var ext= doc.name.toLowerCase().match(/[^\.]+$/); | |
if(doc.mode !=DocumentMode.CMYK && ext == "tif"){ | |
doc.changeMode(ChangeMode.CMYK); |
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
# Generate Txt File With Directory Tree | |
http://superuser.com/questions/258287/how-can-i-export-a-directory-structure | |
Assuming your directory tree is of reasonable size, you could also use the built in tree command, which produces a rather pretty looking directory tree. Unfortunately this prettiness is difficult to get working outside of a cmd instance, so you'll probably want to tell it to just use ascii characters with the /A switch. | |
### Example: | |
From a small multi-level structure |
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
/******************************************************************************* | |
1. DEPENDENCIES | |
*******************************************************************************/ | |
var gulp = require('gulp'); // gulp core | |
sass = require('gulp-sass'), // sass compiler | |
uglify = require('gulp-uglify'), // uglifies the js | |
jshint = require('gulp-jshint'), // check if js is ok | |
rename = require("gulp-rename"); // rename files | |
concat = require('gulp-concat'), // concatinate js |
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
raterizeLayerStyle = -> | |
idrasterizeLayer = stringIDToTypeID('rasterizeLayer') | |
desc = new ActionDescriptor | |
idnull = charIDToTypeID('null') | |
ref = new ActionReference | |
idLyr = charIDToTypeID('Lyr ') | |
idOrdn = charIDToTypeID('Ordn') | |
idTrgt = charIDToTypeID('Trgt') | |
ref.putEnumerated idLyr, idOrdn, idTrgt | |
desc.putReference idnull, ref |
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
/** | |
* 3D Max | |
* COLOR CONVERT FUNCTIONS | |
* Source: http://www.emoticode.net/maxscript/color-convert-functions.html | |
*/ | |
--CONVERT RGB (0-255) TO HEXSTRING | |
fn RGBtoHEX clrRGB = (bit.intAsHex clrRGB.r)+(bit.intAsHex clrRGB.g)+(bit.intAsHex clrRGB.b) | |
RGBtoHEX (color 80 170 178) | |
-->"50aab2" |
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
-- by Denis Trofimov | |
-- http://forums.cgsociety.org/showthread.php?f=98&t=1316990&page=2 | |
macroScript MaterialDisplayToggle | |
category:"Display" | |
toolTip:"Viewport Material Display Toggle" | |
buttontext:"Mat Toggle" | |
autoUndoEnabled:off | |
( |
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
-- Randomly jiggle elements within an object | |
-- http://forums.cgsociety.org/archive/index.php?t-1030430.html | |
-- (c) 2012 Created by 3ak (Alexander Loboda) | |
obj = $ | |
jitter = 2.0 | |
numfaces = polyop.getnumfaces obj | |
allfacearr = #{1..numfaces} | |
for i = 1 to numfaces do |
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
/* Code by Mike Hale http://www.ps-scripts.com/bb/viewtopic.php?f=14&t=1802&start=15 | |
with small modification by Vladimir Carrer | |
*/ | |
function DrawShape() { | |
var doc = app.activeDocument; | |
var y = arguments.length; | |
var i = 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
#target photoshop | |
// $.level = 2; | |
/* | |
* Script by Tomek Cejner (tomek (at) japko dot info) | |
* based on work of Damien van Holten: | |
* http://www.damienvanholten.com/blog/export-groups-to-files-photoshop/ | |
* | |
* My version adds support of nested layer groups, | |
* and exports single layers in addition to groups. |
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
// Notes: | |
// 1. Save this file in Program Files\Adobe\Photoshop\Presets\Scripts\ | |
// 2. Run the script by going to menu File > Scripts > LayersToSpriteSheet | |
// Based on http://alessandroituarte.com/blag/2012/07/03/470 | |
if (documents.length > 0) { | |
// Adjust this to the number of columns you want | |
// leave -1 if you want it to calculate an optimal column value. |