Applying A Motionblur Filter - Adobe 65014912 Manual

Photoshop cs4 extended
Table of Contents

Advertisement

C
3: Scripting Photoshop
HAPTER

Applying a MotionBlur filter

In this section, we will apply a different filter to the other half of our document.
AS
To apply a motionblur filter to HelloWorldDoc:
1. Type the following code into the script file
original preferences.
--change the value of the variable theSelRegion
--to contain the opposite half of the screen
set theSelRegion to {{theDocWidthInPixels / 2, 0},¬
{theDocWidthInPixels, 0}, ¬
{theDocWidthInPixels, theDocHeightInPixels}, ¬
{theDocWidthInPixels / 2, theDocHeightInPixels}, ¬
{theDocWidthInPixels / 2, 0}}
select theDocRef region theSelRegion combination type replaced
filter current layer of theDocRef using motion blur ¬
with options {class:motion blur, angle:45, radius:5}
deselect theDocRef
2. Choose Run to run the script.
N
: Look up the
OTE
Photoshop AppleScript Dictionary to see if you understand how you used it in this script:
VBS
To apply a motionblur filter to HelloWorldDoc:
1. Type the following code into the script file
original preferences.
docRef.Selection.Select Array(Array(docWidthInPixels / 2, 0), _
Array(docWidthInPixels, 0), _
Array(docWidthInPixels, docHeightInPixels), _
Array(docWidthInPixels / 2, docHeightInPixels), _
Array(docWidthInPixels / 2, 0))
newTextLayer.ApplyMotionBlur 45, 5
docRef.Selection.Deselect
2. Double click on the file in Windows Explorer to run the script.
N
: Look up the
OTE
Scripting Reference, or in the Visual Basic Object Browser to see if you understand how you used it in this
script:
class in the Adobe Photoshop CS4 AppleScript Scripting Reference, or in the
motion blur
class:
ArtLayer
ApplyMotionBlur
just above the statements that restore
HelloWorldDoc
just above the statements that restore
HelloWorldDoc
method in the Adobe Photoshop CS4 Visual Basic
Advanced Scripting 71

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents