Re: Bevel and emboss with PSD7
Re: Bevel and emboss with PSD7
- Subject: Re: Bevel and emboss with PSD7
- From: Ron Bishop <email@hidden>
- Date: Thu, 20 Jun 2002 16:30:03 -0500
Here's a monstrosity that embosses 10% with an Inner Bevel, Smooth, 10%
depth, direction up,Size of 10 px, and Soften of 0 px...the javascript
is all one line...
tell application "Adobe Photoshop 7.0"
activate
tell current document
do javascript "{var id103 = charIDToTypeID( \"setd\" ); var
desc15 = new ActionDescriptor(); var id104 = charIDToTypeID( \"null\" );
var ref7 = new ActionReference(); var id105 = charIDToTypeID
( \"Prpr\" ); var id106 = charIDToTypeID( \"Lefx\" ); ref7.putProperty
( id105, id106 ); var id107 = charIDToTypeID( \"Lyr \" ); var id108 =
charIDToTypeID( \"Ordn\" ); var id109 = charIDToTypeID( \"Trgt\" );
ref7.putEnumerated( id107, id108, id109 ); desc15.putReference( id104,
ref7 ); var id110 = charIDToTypeID( \"T \" ); var desc16 = new
ActionDescriptor(); var id111 = charIDToTypeID( \"Scl \" ); var id112 =
charIDToTypeID( \"#Prc\" ); desc16.putUnitDouble( id111, id112,
100.000000 ); var id113 = charIDToTypeID( \"ebbl\" ); var desc17 = new
ActionDescriptor(); var id114 = charIDToTypeID( \"enab\" );
desc17.putBoolean( id114, true ); var id115 = charIDToTypeID
( \"hglM\" ); var id116 = charIDToTypeID( \"BlnM\" ); var id117 =
charIDToTypeID( \"Scrn\" ); desc17.putEnumerated( id115, id116, id117 );
var id118 = charIDToTypeID( \"hglC\" ); var desc18 = new
ActionDescriptor(); var id119 = charIDToTypeID( \"Rd \" );
desc18.putDouble( id119, 255.000000 ); var id120 = charIDToTypeID
( \"Grn \" ); desc18.putDouble( id120, 255.000000 ); var id121 =
charIDToTypeID( \"Bl \" ); desc18.putDouble( id121, 255.000000 ); var
id122 = charIDToTypeID( \"RGBC\" ); desc17.putObject( id118, id122,
desc18 ); var id123 = charIDToTypeID( \"hglO\" ); var id124 =
charIDToTypeID( \"#Prc\" ); desc17.putUnitDouble( id123, id124,
75.000000 ); var id125 = charIDToTypeID( \"sdwM\" ); var id126 =
charIDToTypeID( \"BlnM\" ); var id127 = charIDToTypeID( \"Mltp\" );
desc17.putEnumerated( id125, id126, id127 ); var id128 = charIDToTypeID
( \"sdwC\" ); var desc19 = new ActionDescriptor(); var id129 =
charIDToTypeID( \"Rd \" ); desc19.putDouble( id129, 0.000000 ); var
id130 = charIDToTypeID( \"Grn \" ); desc19.putDouble( id130, 0.000000 );
var id131 = charIDToTypeID( \"Bl \" ); desc19.putDouble( id131,
0.000000 ); var id132 = charIDToTypeID( \"RGBC\" ); desc17.putObject
( id128, id132, desc19 ); var id133 = charIDToTypeID( \"sdwO\" ); var
id134 = charIDToTypeID( \"#Prc\" ); desc17.putUnitDouble( id133, id134,
75.000000 ); var id135 = charIDToTypeID( \"bvlT\" ); var id136 =
charIDToTypeID( \"bvlT\" ); var id137 = charIDToTypeID( \"SfBL\" );
desc17.putEnumerated( id135, id136, id137 ); var id138 = charIDToTypeID
( \"bvlS\" ); var id139 = charIDToTypeID( \"BESl\" ); var id140 =
charIDToTypeID( \"InrB\" ); desc17.putEnumerated( id138, id139, id140 );
var id141 = charIDToTypeID( \"uglg\" ); desc17.putBoolean( id141,
true ); var id142 = charIDToTypeID( \"lagl\" ); var id143 =
charIDToTypeID( \"#Ang\" ); desc17.putUnitDouble( id142, id143,
120.000000 ); var id144 = charIDToTypeID( \"Lald\" ); var id145 =
charIDToTypeID( \"#Ang\" ); desc17.putUnitDouble( id144, id145,
30.000000 ); var id146 = charIDToTypeID( \"srgR\" ); var id147 =
charIDToTypeID( \"#Prc\" ); desc17.putUnitDouble( id146, id147,
10.000000 ); var id148 = charIDToTypeID( \"blur\" ); var id149 =
charIDToTypeID( \"#Pxl\" ); desc17.putUnitDouble( id148, id149,
5.000000 ); var id150 = charIDToTypeID( \"bvlD\" ); var id151 =
charIDToTypeID( \"BESs\" ); var id152 = charIDToTypeID( \"In \" );
desc17.putEnumerated( id150, id151, id152 ); var id153 = charIDToTypeID
( \"TrnS\" ); var desc20 = new ActionDescriptor(); var id154 =
charIDToTypeID( \"Nm \" ); desc20.putString( id154, \"Linear\" ); var
id155 = charIDToTypeID( \"ShpC\" ); desc17.putObject( id153, id155,
desc20 ); var id156 = stringIDToTypeID( \"antialiasGloss\" );
desc17.putBoolean( id156, false ); var id157 = charIDToTypeID
( \"Sftn\" ); var id158 = charIDToTypeID( \"#Pxl\" );
desc17.putUnitDouble( id157, id158, 0.000000 ); var id159 =
stringIDToTypeID( \"useShape\" ); desc17.putBoolean( id159, false ); var
id160 = stringIDToTypeID( \"useTexture\" ); desc17.putBoolean( id160,
false ); var id161 = charIDToTypeID( \"ebbl\" ); desc16.putObject
( id113, id161, desc17 ); var id162 = charIDToTypeID( \"Lefx\" );
desc15.putObject( id110, id162, desc16 ); executeAction( id103, desc15,
DialogModes.NO );}"
end tell
end tell
I got this using the Script Listener plugin. I did the layer style and
recorded it. I copied it from the Console. Pasted it in BBEDIT and
cleaned it up. Pasted that into Script Debugger. Compiled and ran. It
seems to work. Just have a layer selected.
Just set it up once....the Scripting Guide with the plugins provides
some great documentation on how to clean this up further and pass it
variables.
Ron Bishop
On Tuesday, June 18, 2002, at 05:37 PM, Shane Stanley wrote:
On 18/6/02 10:24 PM +1000, Studio G, email@hidden, wrote:
Hello ! Bonjour de Paris !
Bonjour.
OS X.1.5, PSD 7.0 ;
I'm trying to script the bewel and emboss (layer > layer style > bevel
and
emboss...).
My purpose is to emboss pictures with 10%, not with 10 pixels.
Any help (ans exemple of script) would be much apprecieted.
I don't believe what you want is possible. 10% of what?
--
Shane Stanley, email@hidden
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.