Skip to main content
Inspiring
January 19, 2014
Answered

How to find the radius of the filter ?

  • January 19, 2014
  • 1 reply
  • 317 views

Of action received the follow scripts.

I want to change the name of the script layer, depending on the radius of the user-defined filter. How do I find used and set this value to new layer name?

//Blur 

{

jamEngine.jsonPlay

(

"surfaceBlur",

{

"'Rds '":

{

"<unitDouble>":

{

"'#Pxl'": 9

}

},

"'Thsh'":

{

"<integer>": 255

}

},

DialogModes.NO

);

}


//Name

{

jamEngine.jsonPlay

(

"select",

{

"target":

[

"<reference>",

[

[

"layer",

[

"<name>",

"Low=9"

]

]

]

],

"makeVisible":

[

"<boolean>",

false

]

},

DialogModes.NO

);

}

This topic has been closed for replies.
Correct answer c.pfaffenbichler

Does this help?

// 2014, use it at your own risk;

#target photoshop

if (app.documents.length > 0) {

myDocument = app.activeDocument;

// invoke filter;

var idGsnB = stringIDToTypeID( "surfaceBlur" );

var theEntry = executeAction( idGsnB, undefined, DialogModes.ALL );

// get value;

var theValue = theEntry.getUnitDoubleValue(theEntry.getKey(0));

var theValue2 = theEntry.getUnitDoubleValue(theEntry.getKey(1));

alert (theValue+"\n"+theValue2)

};

Why do you want to do that anyway?

1 reply

c.pfaffenbichler
Community Expert
c.pfaffenbichlerCommunity ExpertCorrect answer
Community Expert
January 19, 2014

Does this help?

// 2014, use it at your own risk;

#target photoshop

if (app.documents.length > 0) {

myDocument = app.activeDocument;

// invoke filter;

var idGsnB = stringIDToTypeID( "surfaceBlur" );

var theEntry = executeAction( idGsnB, undefined, DialogModes.ALL );

// get value;

var theValue = theEntry.getUnitDoubleValue(theEntry.getKey(0));

var theValue2 = theEntry.getUnitDoubleValue(theEntry.getKey(1));

alert (theValue+"\n"+theValue2)

};

Why do you want to do that anyway?