Re: Bevel and emboss with PSD7
Re: Bevel and emboss with PSD7
- Subject: Re: Bevel and emboss with PSD7
- From: Paul Skinner <email@hidden>
- Date: Fri, 21 Jun 2002 09:13:00 -0400
This is a shortened version of 13k post that awaits moderator approval.
Hope both don't get through.
On Thursday, June 20, 2002, at 06:35 PM, Shane Stanley wrote:
On 21/6/02 7:30 AM +1000, Ron Bishop, email@hidden, wrote:
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...
I _think_ the original poster was after size as a percentage rather than
pixels.
--
Shane Stanley, email@hidden
Right.
Photoshop 7.0 Scripting Guide 84
3.17.1 Using the Action Manager from JavaScript
As an example let's say that you want to be able to use the Emboss
filter.
Funny.
--Emboss layer in PhotoShop 7
--Paul Skinner Friday, 21. June 2002 09:08:30
tell application "Adobe Photoshop 7.0"
activate
set newDocRef to make new document with properties {width:1000 as
pixels, height:600 as pixels}
set background layer of layer 1 of newDocRef to false
set w to the width of newDocRef as pixels as integer
display dialog "What percentage do you want to emboss?" default
answer "15"
set embossPercentage to the text returned of the result as number
set embossPixelSize to round ((w / 100) * embossPercentage)
set percentage to 77
do javascript "var id30 = charIDToTypeID( \"setd\" );
var desc6 = new ActionDescriptor();
var id31 = charIDToTypeID( \"null\" );
var ref2 = new ActionReference();
var id32 = charIDToTypeID( \"Prpr\" );
var id33 = charIDToTypeID( \"Lefx\" );
ref2.putProperty( id32, id33 );
var id34 = charIDToTypeID( \"Lyr \" );
var id35 = charIDToTypeID( \"Ordn\" );
var id36 = charIDToTypeID( \"Trgt\" );
ref2.putEnumerated( id34, id35, id36 );
desc6.putReference( id31, ref2 );
var id37 = charIDToTypeID( \"T \" );
var desc7 = new ActionDescriptor();
var id38 = charIDToTypeID( \"Scl \" );
var id39 = charIDToTypeID( \"#Prc\" );
desc7.putUnitDouble( id38, id39, 100.000000 );
var id40 = charIDToTypeID( \"ebbl\" );
var desc8 = new ActionDescriptor();
var id41 = charIDToTypeID( \"enab\" );
desc8.putBoolean( id41, true );
var id42 = charIDToTypeID( \"hglM\" );
var id43 = charIDToTypeID( \"BlnM\" );
var id44 = charIDToTypeID( \"Scrn\" );
desc8.putEnumerated( id42, id43, id44 );
var id45 = charIDToTypeID( \"hglC\" );
var desc9 = new ActionDescriptor();
var id46 = charIDToTypeID( \"Rd \" );
desc9.putDouble( id46, 255.000000 );
var id47 = charIDToTypeID( \"Grn \" );
desc9.putDouble( id47, 255.000000 );
var id48 = charIDToTypeID( \"Bl \" );
desc9.putDouble( id48, 255.000000 );
var id49 = charIDToTypeID( \"RGBC\" );
desc8.putObject( id45, id49, desc9 );
var id50 = charIDToTypeID( \"hglO\" );
var id51 = charIDToTypeID( \"#Prc\" );
desc8.putUnitDouble( id50, id51, 75.000000 );
var id52 = charIDToTypeID( \"sdwM\" );
var id53 = charIDToTypeID( \"BlnM\" );
var id54 = charIDToTypeID( \"Mltp\" );
desc8.putEnumerated( id52, id53, id54 );
var id55 = charIDToTypeID( \"sdwC\" );
var desc10 = new ActionDescriptor();
var id56 = charIDToTypeID( \"Rd \" );
desc10.putDouble( id56, 0.000000 );
var id57 = charIDToTypeID( \"Grn \" );
desc10.putDouble( id57, 0.000000 );
var id58 = charIDToTypeID( \"Bl \" );
desc10.putDouble( id58, 0.000000 );
var id59 = charIDToTypeID( \"RGBC\" );
desc8.putObject( id55, id59, desc10 );
var id60 = charIDToTypeID( \"sdwO\" );
var id61 = charIDToTypeID( \"#Prc\" );
desc8.putUnitDouble( id60, id61, 75.000000 );
var id62 = charIDToTypeID( \"bvlT\" );
var id63 = charIDToTypeID( \"bvlT\" );
var id64 = charIDToTypeID( \"SfBL\" );
desc8.putEnumerated( id62, id63, id64 );
var id65 = charIDToTypeID( \"bvlS\" );
var id66 = charIDToTypeID( \"BESl\" );
var id67 = charIDToTypeID( \"Embs\" );
desc8.putEnumerated( id65, id66, id67 );
var id68 = charIDToTypeID( \"uglg\" );
desc8.putBoolean( id68, true );
var id69 = charIDToTypeID( \"lagl\" );
var id70 = charIDToTypeID( \"#Ang\" );
desc8.putUnitDouble( id69, id70, 120.000000 );
var id71 = charIDToTypeID( \"Lald\" );
var id72 = charIDToTypeID( \"#Ang\" );
desc8.putUnitDouble( id71, id72, 30.000000 );
var id73 = charIDToTypeID( \"srgR\" );
var id74 = charIDToTypeID( \"#Prc\" );
desc8.putUnitDouble( id73, id74, " & percentage & " );
var id75 = charIDToTypeID( \"blur\" );
var id76 = charIDToTypeID( \"#Pxl\" );
desc8.putUnitDouble( id75, id76, " & embossPixelSize & " );
var id77 = charIDToTypeID( \"bvlD\" );
var id78 = charIDToTypeID( \"BESs\" );
var id79 = charIDToTypeID( \"In \" );
desc8.putEnumerated( id77, id78, id79 );
var id80 = charIDToTypeID( \"TrnS\" );
var desc11 = new ActionDescriptor();
var id81 = charIDToTypeID( \"Nm \" );
desc11.putString( id81, \"Linear\" );
var id82 = charIDToTypeID( \"ShpC\" );
desc8.putObject( id80, id82, desc11 );
var id83 = stringIDToTypeID( \"antialiasGloss\" );
desc8.putBoolean( id83, false );
var id84 = charIDToTypeID( \"Sftn\" );
var id85 = charIDToTypeID( \"#Pxl\" );
desc8.putUnitDouble( id84, id85, 10.000000 );
var id86 = stringIDToTypeID( \"useShape\" );
desc8.putBoolean( id86, false );
var id87 = stringIDToTypeID( \"useTexture\" );
desc8.putBoolean( id87, false );
var id88 = charIDToTypeID( \"ebbl\" );
desc7.putObject( id40, id88, desc8 );
var id89 = charIDToTypeID( \"Lefx\" );
desc6.putObject( id37, id89, desc7 );
executeAction( id30, desc6, DialogModes.NO );"
end tell
--end script
Man! That makes AppleScript syntax look so good by comparison.
--
Can't make "old8tracks" into a record.
Paul Skinner
_______________________________________________
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.