Copy link to clipboard
Copied
a new function, layer.merge() is added since photoshop API ver23.
but the documentation doesn't have enough description of how to use this function.
https://developer.adobe.com/photoshop/uxp/2022/ps_reference/classes/layer/
"merge" in this doc is missing sample code and the parameter descriptions.
and I cannot find any photoshop-UXP code examples which use this new function layer.merge() .
Does anyone know how to use
layer.merge() ?
the API reference doc says that all layers to be merged need to be selected before they are merged.
I understood it as all merging layers need to have its property, 'selected" to be true.
"layer.selected = true"
but after layers selection, how can I execute layer.merge() to merge the selected layers?
Copy link to clipboard
Copied
I would look at this page: https://developer.adobe.com/photoshop/uxp/2022/ps_reference/#layer Scroll down to the "Layer" section and you will see an example using layer.scale(80,80). I would replace that with layer.merge() and give it a try.