
Adobe Photoshop CS3
JavaScript Scripting Reference
JavaScript Object Reference 124
LayerComp
A snapshot of a state of the layers in a document (can be used to view different page layouts or
compostions).
Note:
Because the
LayerComp
class is also a property of the
Document
object, you use the property name,
layerComp
, rather than the class name,
LayerComp
, in your code.
The following example uses correct syntax to set the comment property value for a
LayerComp
object named
myLayerComp
:
activeDocument.layerComp(“myLayerComp”).comment = “View from shoreline”
The following example, which uses an upper case
L
in the object name, is incorrect:
activeDocument.LayerComp(“myLayerComp”).comment = “View from shoreline”
Properties
Methods
Property
Value Type
What it is
appearance
boolean
Read-write. Indicates whether to use
layer appearance (layer styles) settings.
comment
string
Read-write. A description of the layer
comp.
name
string
Read-write. The name of the layer comp.
parent
object (
Document
)
Read-write. The
layerComp
object's
container.
position
boolean
Read-write. Indicates whether to use
layer position.
selected
boolean
Read-only. Indicates whether the layer
comp is currently selected.
typename
string
Read-only. The class name of the
referenced
layerComp
object.
visibility
boolean
Read-write. Indicates whether to use
layer visibility settings .
Method
Parameter Type
Returns
What it does
apply
()
Applies the layer comp to the document.
recapture
()
Recaptures the current layer state(s) for
this layer comp.