• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
7

Action Descriptor layerKind different to object dom kind?

Contributor ,
Jun 16, 2023 Jun 16, 2023

Copy link to clipboard

Copied

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
TOPICS
Actions and scripting , macOS , SDK , Windows

Views

88

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Contributor , Jun 16, 2023 Jun 16, 2023

Votes

Translate

Translate
Adobe
Community Expert ,
Jun 16, 2023 Jun 16, 2023

Copy link to clipboard

Copied

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jun 16, 2023 Jun 16, 2023

Copy link to clipboard

Copied

@Stephen_A_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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jun 16, 2023 Jun 16, 2023

Copy link to clipboard

Copied

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-g...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 16, 2023 Jun 16, 2023

Copy link to clipboard

Copied

LATEST

Good find, yes, AM code is often more complicated than DOM.

 

It took a bit of work for me to differentiate between layer sets, frames and artboards, as they are all the same thing with DOM, it needs AM to drill in deeper.

 

https://community.adobe.com/t5/photoshop-ecosystem-discussions/custom-script-for-renaming-artboards-...

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines