Skip to main content
Inspiring
November 22, 2010
Answered

Creating adjustment layers without Script Listener code

  • November 22, 2010
  • 3 replies
  • 2268 views

I'm assuming it's possible to create an adjustment layer without Script Listener code, but I can't figure out how. I can create a normal layer and change it to a text layer and that seems to be about it. I was specifically trying to create a Photo Filter layer. I can do it with Script Listener code, but now I'm just curious.

Example:

adjLayer=app.activeDocument.artLayers.add().kind=LayerKind.TEXT; <--This works.

adjLayer=app.activeDocument.artLayers.add().kind=LayerKind.PHOTOFILTER;  <--Does not work.

It allows changing to/from either a normal or text layer only. There is also a photoFilter() method which allows adjusting the values of a Photo Filter layer but only if one already exists.

So it appears that the add() method in the artLayers collection is only good for adding a normal or text layer. Is there any way to add an adjustment layer (other than using Script Listener code)?

Am I missing something simple?

This topic has been closed for replies.
Correct answer Muppet_Mark-QAl63s

Im almost certain that you can't… There are quite a few of things that you might expect to find in the Photoshop DOM that just ain't there… Where you are expected to get your hands a little dirty using scriptlistener plug-in provided… This is still better than the Illustrator approach of just leaving a bloody great void… It has actions much like Photoshop (now Im being presumptuous) but no plug-in…

3 replies

Inspiring
November 22, 2010

jugenjury wrote:

It allows changing to/from either a normal or text layer only. There is also a photoFilter() method which allows adjusting the values of a Photo Filter layer but only if one already exists.

It could be me that is missing something but photoFilter() applies that filer to an artLayer. It doesn't work with a photoFilter adjustment layer.

jugenjuryAuthor
Inspiring
November 22, 2010

Yes. My mistake. You are absolutely right.


jugenjuryAuthor
Inspiring
November 22, 2010

Thanks, guys. I was pulling what's left of my hair out the other day and just gave up and used Script Listener code instead. I do tend to miss things that are right in front of me, though.

Muppet_Mark-QAl63s
Muppet_Mark-QAl63sCorrect answer
Inspiring
November 22, 2010

Im almost certain that you can't… There are quite a few of things that you might expect to find in the Photoshop DOM that just ain't there… Where you are expected to get your hands a little dirty using scriptlistener plug-in provided… This is still better than the Illustrator approach of just leaving a bloody great void… It has actions much like Photoshop (now Im being presumptuous) but no plug-in…

Inspiring
November 22, 2010

I argee with Mark. Even though the scripting guide reads like you can set the layer kind property to any of the different layerKinds I have never gotten it to work with anything other that TEXT.