What’s the correct way to return all of the selected layer id’s with batchPlay?
Also, does any batchPlay layer property indicate whether or not a layer is selected?
This code will return some key identifiers for all layers:
async function test_modal_function(){
layerProperties =
{ _obj: “multiGet”,
_target: {_ref: [{_ref: "document", _enum: "ordinal"}]}, extendedReference: [["name", "layerID", "parentLayerID", "itemIndex", "group", "layerKind"], {_obj: "layer", index:1, count:-1}], options: {failOnMissingProperty:false, failOnMissingElement: false}
};
result = await require(“photoshop”).action.batchPlay([layerProperties], {});
console.log(result)
}
Is there a syntax for the target term: {_obj: “layer”, index:1, count:-1}, that will return these data for all selected layers?
Alternatively, is there a layer property that can be returned that indicates whether or not that layer is selected?