// layerProperties.jsx // Copyright 2006-2008 // Written by Jeffrey Tranberry // Photoshop for Geeks Version 2.0 /* Description: Experiment displaying and setting the current Layer's properties. */ // enable double clicking from the // Macintosh Finder or the Windows Explorer #target photoshop // Make Photoshop the frontmost application app.bringToFront(); ///////////////////////// // SETUP ///////////////////////// ///////////////////////// // MAIN ///////////////////////// // Display a dialog with the current Layer's blendMode alert(app.activeDocument.activeLayer.blendMode); // Display a dialog with the current Layer's opacity alert(app.activeDocument.activeLayer.opacity); // Display a dialog with the current Layer's lock state alert(app.activeDocument.activeLayer.allLocked); // Display a dialog with the current Layer's visibility state alert(app.activeDocument.activeLayer.visible); // Set the current Layer's blendMode to MULTIPLY app.activeDocument.activeLayer.blendMode = BlendMode.MULTIPLY; // Set the current Layer's opacity to 50% app.activeDocument.activeLayer.opacity = 50; // Set the current Layer's locked state to flase app.activeDocument.activeLayer.allLocked= false; // Set the current Layer's visibility to false app.activeDocument.activeLayer.visible = false; // Display a dialog with the current Layer's bounds (Read Only) alert(app.activeDocument.activeLayer.bounds); ///////////////////////// // FUNCTIONS /////////////////////////