我如何将可见层合并为新层?

问题描述 投票:0回答:1

我使用了activeDocument.mergeVisibleLayers();,但这不是我想要的,因为它不包括其他层。在Photoshop快捷方式中,我曾经使用Ctrl + Shift + Alt + E。有人知道该怎么做吗?

javascript photoshop extendscript photoshop-script
1个回答
0
投票

应该有一个布尔值告诉PS是否要使层变平,但是在DOM代码中通常没有这种情况。救援AM代码!

var desc = new ActionDescriptor();
desc.putBoolean(charIDToTypeID('Dplc'), true); // true to merge to new, false to flatten
executeAction(charIDToTypeID('MrgV'), desc, DialogModes.NO);
© www.soinside.com 2019 - 2024. All rights reserved.