Skip to main content
Inspiring
June 16, 2023
Answered

Action Descriptor layerKind different to object dom kind?

  • June 16, 2023
  • 1 reply
  • 611 views

Hey

Perhaps some1 can help me out there.

I'm trying to figure out why action descriptor result is different to dom, or how to get the same result?

 

my results:

 

ActDescr : 

{"id":3,"name":"Brightness/Contrast 1","kind":2}
{"id":4,"name":"Levels 1","kind":2}
{"id":5,"name":"Curves 1","kind":2}
{"id":6,"name":"Exposure 1","kind":2}
{"id":7,"name":"Vibrance 1","kind":2}
{"id":8,"name":"Hue/Saturation 1","kind":2}
{"id":9,"name":"Color Balance 1","kind":2}
{"id":10,"name":"Black & White 1","kind":2}
{"id":11,"name":"Photo Filter 1","kind":2}
{"id":12,"name":"Channel Mixer 1","kind":2}
{"id":13,"name":"Color Lookup 1","kind":2}
{"id":14,"name":"Invert 1","kind":2}
{"id":15,"name":"Posterize 1","kind":2}
{"id":16,"name":"Threshold 1","kind":2}
{"id":17,"name":"Selective Color 1","kind":2}
{"id":18,"name":"Gradient Map 1","kind":2}

Doms : 
LayerKind.GRADIENTMAP 13 Gradient Map 1
LayerKind.SELECTIVECOLOR 11 Selective Color 1
LayerKind.THRESHOLD 15 Threshold 1
LayerKind.POSTERIZE 16 Posterize 1
LayerKind.INVERSION 14 Invert 1
LayerKind.COLORLOOKUP 24 Color Lookup 1
LayerKind.CHANNELMIXER 12 Channel Mixer 1
LayerKind.PHOTOFILTER 18 Photo Filter 1
LayerKind.BLACKANDWHITE 22 Black & White 1
LayerKind.COLORBALANCE 8 Color Balance 1
LayerKind.HUESATURATION 10 Hue/Saturation 1
LayerKind.VIBRANCE 23 Vibrance 1
LayerKind.EXPOSURE 19 Exposure 1
LayerKind.CURVES 7 Curves 1
LayerKind.LEVELS 6 Levels 1
LayerKind.BRIGHTNESSCONTRAST 9 Brightness/Contrast 1
LayerKind.NORMAL 1 Layer 1

 

using this to get kind...

desc.getInteger(stringIDToTypeID("layerKind"))
It returns all as 2... 
 
Did I mix up something here?
Regards
Dariusz
This topic has been closed for replies.
Correct answer Dariusz1989

It appears however that his answer gets me somewhat closer to where I need to be 

https://community.adobe.com/t5/photoshop-ecosystem-discussions/get-layerkind-of-a-specific-layer-i-got-the-index-through-action-manager-scripting/m-p/11192800

1 reply

Stephen Marsh
Community Expert
Community Expert
June 16, 2023
Inspiring
June 16, 2023

@Stephen Marsh Sadly no, it returns kind but not the same kind 😕😕

Will keep digging, there must be a way to get the same type int/str/enum from it.

Dariusz1989AuthorCorrect answer
Inspiring
June 16, 2023