Layer
A layer object.
Superclass of ArtLayer, LayerSet
Layers may contain nested layers, which are called sublayers in the user interface. The layer object contains all of the page items in the specific layer as elements. Your script can access page items as elements of either the layer object or the document object.
QuickLinks
Hierarchy
Properties
Property | Type | Access | Description |
---|---|---|---|
allLocked | bool | r/w | If true, the layer's contents and settings are locked. |
blendMode | BlendMode: BlendMode.PASSTHROUGH BlendMode.NORMAL BlendMode.DISSOLVE BlendMode.DARKEN BlendMode.MULTIPLY BlendMode.COLORBURN BlendMode.LINEARBURN BlendMode.LIGHTEN BlendMode.SCREEN BlendMode.COLORDODGE BlendMode.LINEARDODGE BlendMode.OVERLAY BlendMode.SOFTLIGHT BlendMode.HARDLIGHT BlendMode.VIVIDLIGHT BlendMode.LINEARLIGHT BlendMode.PINLIGHT BlendMode.DIFFERENCE BlendMode.EXCLUSION BlendMode.HUE BlendMode.SATURATION BlendMode.COLORBLEND BlendMode.LUMINOSITY BlendMode.HARDMIX BlendMode.LIGHTERCOLOR BlendMode.DARKERCOLOR |
r/w | The mode to use when compositing an object. |
bounds | UnitRect | readonly | Bounding rectangle of the Layer. |
linkedLayers | Array of Layer | readonly | The layers linked to this layer. |
name | string | r/w | The name of the layer. |
opacity | number (range: 0 - 100) | r/w | The layer's master opacity (as a percentage). Range: 0.0 to 100.0. |
parent | Object | readonly | The object's container. |
typename | string | readonly | The class name of the object. |
visible | bool | r/w | If true, the layer is visible. |
xmpMetadata | XMPMetadata | readonly | The XMP properties of the document. The Camera RAW settings are stored here. |
Methods
Instances
Layer duplicate ([relativeObject:
Object][, insertionLocation:
ElementPlacement])
Duplicate this object.
Parameter | Type | Description |
---|---|---|
relativeObject | Object | (Optional) |
insertionLocation | ElementPlacement: ElementPlacement.PLACEAFTER ElementPlacement.PLACEBEFORE ElementPlacement.PLACEATEND | (Optional) |
void link (with:
Layer)
Links the layer with the specified layer.
Parameter | Type | Description |
---|---|---|
with | Layer | The layer to link to. |
Layer move (relativeObject:
Object, insertionLocation:
ElementPlacement)
Move the object.
Parameter | Type | Description |
---|---|---|
relativeObject | Object | |
insertionLocation | ElementPlacement: ElementPlacement.PLACEAFTER ElementPlacement.PLACEBEFORE ElementPlacement.PLACEATEND |
void moveToEnd ([layerSet:
LayerSet])
...
Parameter | Type | Description |
---|---|---|
layerSet | LayerSet | (Optional) |
void remove ()
Deletes this object.
void removeAll ()
Deletes all elements.
void resize ([horizontal:
number=100][, vertical:
number=100][, anchor:
AnchorPosition=AnchorPosition.MIDDLECENTER])
Scales the object.
Parameter | Type | Description |
---|---|---|
horizontal | number | The amount to scale the object horizontally (as a percentage). (default: 100) (Optional) |
vertical | number | The amount to scale the object vertically (as a percentage). (default: 100) (Optional) |
anchor | AnchorPosition: AnchorPosition.TOPLEFT AnchorPosition.TOPCENTER AnchorPosition.TOPRIGHT AnchorPosition.MIDDLELEFT AnchorPosition.MIDDLECENTER AnchorPosition.MIDDLERIGHT AnchorPosition.BOTTOMLEFT AnchorPosition.BOTTOMCENTER AnchorPosition.BOTTOMRIGHT | The point to resize about. (default: AnchorPosition.MIDDLECENTER) (Optional) |
void rotate (angle:
number[, anchor:
AnchorPosition=AnchorPosition.MIDDLECENTER])
Rotates the object.
Parameter | Type | Description |
---|---|---|
angle | number | The number of degrees to rotate the object. |
anchor | AnchorPosition: AnchorPosition.TOPLEFT AnchorPosition.TOPCENTER AnchorPosition.TOPRIGHT AnchorPosition.MIDDLELEFT AnchorPosition.MIDDLECENTER AnchorPosition.MIDDLERIGHT AnchorPosition.BOTTOMLEFT AnchorPosition.BOTTOMCENTER AnchorPosition.BOTTOMRIGHT | The point to rotate about. (default: AnchorPosition.MIDDLECENTER) (Optional) |
void translate ([deltaX:
UnitValue][, deltaY:
UnitValue])
Moves the object relative to its current position.
Parameter | Type | Description |
---|---|---|
deltaX | UnitValue | The amount to move the object horizontally. (Optional) |
deltaY | UnitValue | The amount to move the object vertically. (Optional) |
Element of
Document.activeLayer
Layer.linkedLayers
Used in:
void Layer.link (with: Layer)
Return
Layer Layer.duplicate ([relativeObject: Object][, insertionLocation: ElementPlacement])
Layer Layer.move (relativeObject: Object, insertionLocation: ElementPlacement)
Layer Layers.[] (index: uint)
Layer Layers.getByName (name: string)
Jongware, 28-Aug-2012 v3.0.3i | Contents :: Index |