Skip to content

Instantly share code, notes, and snippets.

@K-atc
Created February 7, 2015 08:23
Show Gist options
  • Save K-atc/1e605c33d0ec2c51f8b0 to your computer and use it in GitHub Desktop.
Save K-atc/1e605c33d0ec2c51f8b0 to your computer and use it in GitHub Desktop.
現在アクティブなPhotoshopドキュメントのすべてのグループを非表示にする
#target photoshop
//app.displayDialogs = DialogModes.NO;
//ドキュメントが開かれているかどうか判別
if (app.documents.length ==0){
//ドキュメントが開かれていない場合処理なし
}
else{
try {
//全てのレイヤーの表示を非表示に
for (var i = 0; i < app.activeDocument.layerSets.length; i++){
//非表示に
app.activeDocument.layerSets[i] .visible = false;
}
} catch (e) {
if ( DialogModes.NO != app.playbackDisplayDialogs ) {
alert(e);
}
//return 'cancel'; // quit, returning 'cancel' (dont localize) makes the actions palette not record our script
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment