Skip to main content
Inspiring
May 3, 2019
Answered

Action Scripting Question - Leaving Current Values Alone

  • May 3, 2019
  • 2 replies
  • 547 views

Hi,

I'm very new to the land of scripting for Photoshop. I've a ton of experience working with .NET, but not a lot on JavaScript, or the Photoshop object model. I've managed to work out what I need to change from the script listener output and I think I've a handle on what it is doing, but not quite whether I can pick and choose! So, the way I'm reading the script is;

First variable obtains a pointer to the object that is to be manipulated

The action descriptor variables then seems to build the new property values

Am I right in assuming that if you don't "put" a new value into one of the property elements it will retain its original value when it is passed into the execution action?

Thanks,

David

This topic has been closed for replies.
Correct answer dhb2206a


Got it working and looks like I've answered my own question - no you can't remove all the other values, which is a bummer when you want to play with the camera postion! The reason it failed was;

a. I had removed what I thought was irrelevant property sets

b. I didn't have the 3D layer selected

Now my object is rotating nicely about the y-axis, all I have to puzzle out now is the export routine!

2 replies

Chuck Uebele
Community Expert
Community Expert
May 3, 2019

I'm not sure about that. Some things just aren't script-able.

Chuck Uebele
Community Expert
Community Expert
May 3, 2019

Yes, if you don't change the values, they will remind what they were, when the code was recorded. You just want to put variables in places that you want to be able to alter the original values.

dhb2206aAuthor
Inspiring
May 3, 2019

Thanks Chuck,

Just had an attempt at this trying to rotate the mesh on a 3d object. Does the mesh have to be selected for the action to operate or are some things just not allowed?

JJMack
Community Expert
Community Expert
May 3, 2019

I would like to suggest that you should check out the Clean SL script make sue you get the latest version. I can help you make functiols from Scriptlistener code.

Clean SL

JJMack