
Adobe Photoshop CS3
JavaScript Scripting Reference
JavaScript Object Reference 128
LayerSet
A group of layer objects, which can include
artLayer
objects and other (nested)
layerSet
objects. A
single command or set of commands manipulates all layers in a
layerSet
object.
Note:
Most likely, you will use variables to refer to
layerSet
objects in your script. However, if you choose
not to use a variable, be aware that, because the
LayerSet
class is also a property of the
Document
object, you use the property name,
layerSet
, rather than the class name,
LayerSet
, in your code.
The following example uses correct syntax to refer to a
layerSet
object by name and then assign
its
allLocked
property value:
documents(0).layerSet(“myLayerSet”).allLocked = true
The following example, which uses an upper case
L
in the object name, is incorrect:
documents(0).LayerSet(“myLayerSet”).allLocked = true
Properties
Property
Value Type
What it is
allLocked
boolean
Read-write. Indicates whether the contents in the layers
contained in the
layerSet
object are editable.
artLayers
ArtLayers
Read-only. The
artLayer
objects in this layer set.
blendMode
BlendMode
Read-write. The blend mode to use for the layer set.
bounds
array(UnitValue)
Read-only. The bounding rectangle of the layer set.
Note:
For information about the
UnitValue
type, see
the
JavaScript Tools Guide
.
enabledChannels
array of
Channel
objects
Read-write. The channels enabled for the layer set; must
be a list of component channels.
Note:
See
kind
in the Properties table for the Channel
object (
Channel
).
layers
Layers
Read-only. The layers in this
layerSet
object.
layerSets
LayerSets
Read-only. Layer Sets contained within a Layer Set.
linkedLayers
array of
ArtLayer
and/or
LayerSet
Read-only. The layers linked to this
layerSet
object.
name
string
Read-write. The name of the
layerSet
object.
opacity
number (double)
Read-write. The master opacity of the
layerSet
object
(0.0 - 100.0).
parent
object (
Document
or
LayerSet
)
Read-only. The
layerSet
object's container.
typename
string
Read-only. The class name of the referenced
layerSet
object.
visible
boolean
Read-write. Indicates whether the
layerSet
object is
visible.