하나의 문서에서 다른 레이어로 레이어를 복제하는 데 문제가 있습니다. 나는 (내 포토샵 문서 내부 .jsx 스크립트)이 코드JSX 중복 레이어 adobe 포토샵
var docRef = app.activeDocument;
app.activeDocument.selection.selectAll();
var calcWidth = app.activeDocument.selection.bounds[2] -app.activeDocument.selection.bounds[0];
var calcHeight = app.activeDocument.selection.bounds[3] - app.activeDocument.selection.bounds[1];
var docResolution = app.activeDocument.resolution;
var document = app.documents.add(calcWidth, calcHeight, docResolution);
app.activeDocument = docRef;
try {
dupObj.artLayers[i].duplicate(document, ElementPlacement.INSIDE);
}
catch(e) {
alert(e)
}
을 가지고하지만 난 여전히 오류
Error: You can only duplicate layers from the frontmost document.
당신이 어떤 아이디어가 어떻게 작동 만들어야을받는 건가요?