So I found this topic about document bits and managed to get a color of one active layer with:
batchPlay(
[{
"_obj": "get",
"_target": [{
"_property": "color"
},
{
"_ref": "layer",
"_enum": "ordinal",
"_value": "targetEnum"
}
],
"_options": {
"dialogOptions": "dontDisplay"
}
}], {
"synchronousExecution": false,
"modalBehavior": "fail"
})
But the result is a bit strange. There are seven colors I can assign to layers and five of them return usual color names (red
, blue
, orange
, etc.), but two of them are different. Yellow is yellowColor
and green is grain
I’m a bit lost here. Is there some real documentation with full reference about all this batchPlay
and descriptors stuff?
Another problem I have - how to get a color of a particular layer I have as an object in UXP script? I guess same question goes for setting the color and unsetting