Making adjustment layers..

Anyone, especially newbies, asking for help with Photoshop Scripting and Photoshop Automation - as opposed to those contributing to discussion about an aspect of Photoshop Scripting

Moderators: Kukurykus, Tom, xbytor

IAMasd98_
Posts: 2
Joined: Mon May 03, 2021 10:24 pm

Making adjustment layers..

Post by IAMasd98_ »

I have managed to make normal layers, but whenever i try to edit it says i can only change the kind to 'normal' or 'text'.
Is it possible to make adjustment layers (like B&W)?

User avatar
Kukurykus
Posts: 363
Joined: Mon Jul 25, 2016 12:36 pm

Re: Making adjustment layers..

Post by Kukurykus »

Can you describe how exactly you try to edit adjustement layers?

IAMasd98_
Posts: 2
Joined: Mon May 03, 2021 10:24 pm

Re: Making adjustment layers..

Post by IAMasd98_ »

I try to make them like this, but it says i can only change the kind to "NORMAL" or "TEXT".

Code: Select all

const newLayer = app.activeDocument.artLayers.add()
newLayer.kind = LayerKind.BLACKANDWHITE
Am i missing something here?

User avatar
Kukurykus
Posts: 363
Joined: Mon Jul 25, 2016 12:36 pm

Re: Making adjustment layers..

Post by Kukurykus »

'kind' is read only property. You can't add adjustement layer by Document Object Model. Do it with with Action Manager.

IAMasd98_
Posts: 2
Joined: Mon May 03, 2021 10:24 pm

Re: Making adjustment layers..

Post by IAMasd98_ »

I really don't get the Action Manager. I checked the documentation, but it didn't really help.. Do you know any guides or something to the Action Manager?

Edit: nvm i kind of get it now, that i found ps sdk and with the scriptlistener, BUT i don't find anything related to what are the inputs that the events need (like "eventMake" or stuff like that)
Last edited by IAMasd98_ on Tue May 04, 2021 5:53 pm, edited 1 time in total.

User avatar
Kukurykus
Posts: 363
Joined: Mon Jul 25, 2016 12:36 pm

Re: Making adjustment layers..

Post by Kukurykus »

Good you found ScriptListener. Add B&W adjustement layer, change some value and check the log.