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...
It appears however that his answer gets me somewhat closer to where I need to be
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
It appears however that his answer gets me somewhat closer to where I need to be
Copy link to clipboard
Copied
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.