DTP駆け込み寺
  1. [664] PHOTOSHOPでレイヤーを連続保存したいのですが。 旧掲示板 2004/10/26 12:17

[ 返信 ]

PHOTOSHOPでレイヤーを連続保存したいのですが。

はじめまして。
PHOTOSHOP7.0を使っています。

質問なのですが、各レイヤーをそれぞれ.JPGで書き出したいのですがアクションを使って連続別名保存などできるのでしょうか?
できれば、各レイヤーに名前を付けているのでその名前で保存したいのですが。
1つ1つやればいいのですが、膨大にあって困っています。
是非よろしくお願いします。

TAKE 2004/10/26 12:17:46
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)

−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−

001

if (documents.length > 0){
var docRef = activeDocument;
var myPath = docRef.path + "/";

for (i = 1; i < docRef.layers.length; i++){
var MyLayName = docRef.layers[i-1].name;
if ( !docRef.saved ){
alert( "You must save the document before executing this script" );
}else{
// Save as Photoshop.
psFile = new File( myPath.toString() + MyLayName );
psSaveOptions = new PhotoshopSaveOptions();
psSaveOptions.alphaChannels = true;
psSaveOptions.annotations = true;
psSaveOptions.embedColorProfile = true;
psSaveOptions.layers = true;
psSaveOptions.maximizeCompatibility = true;
psSaveOptions.spotColors = true;
docRef.saveAs(psFile, psSaveOptions, true, Extension.UPPERCASE);

//docRef.activeLayer.remove();//そのレイヤーを削除
docRef.layers[i-1].visible = false;//そのレイヤーを隠す
}
}
}else{
alert ("You must have at least one open document to run this script");
}

サンプルを見れば、初めて書く私でもこれくらいはできる。
あんたも努力すればぁ
ファイル名の日本語処理がおかしいんだけど、なんで?

??? 2004/10/27 15:18:03
Mozilla/4.0 (compatible; MSIE 5.17; Mac_PowerPC)
−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−

[664] 旧掲示板 (2004/10/26 Tue 12:17)