.. _Layer: ================================================ Layer ================================================ Description ----------- A layer object. 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. Properties ^^^^^^^^^^ +--------------------------------------------------------+-------------------------------------------------------------------------------------------------------+ | :ref:`allLocked` readonly | If true, the layer's contents and settings are locked. | +--------------------------------------------------------+-------------------------------------------------------------------------------------------------------+ | :ref:`blendMode` readonly | The mode to use when compositing an object. | +--------------------------------------------------------+-------------------------------------------------------------------------------------------------------+ | :ref:`bounds` readonly | If the Layer is a layer set, this property returns a reference to the corresponding layer set object. | +--------------------------------------------------------+-------------------------------------------------------------------------------------------------------+ | :ref:`boundsNoEffects` readonly | Bounding rectangle of the Layer not including effects. | +--------------------------------------------------------+-------------------------------------------------------------------------------------------------------+ | :ref:`id` readonly | The unique ID of this layer. | +--------------------------------------------------------+-------------------------------------------------------------------------------------------------------+ | :ref:`itemIndex` readonly | The layer index sans layer groups, how Photoshop would index them. | +--------------------------------------------------------+-------------------------------------------------------------------------------------------------------+ | :ref:`linkedLayers` readonly | The layers linked to this layer. | +--------------------------------------------------------+-------------------------------------------------------------------------------------------------------+ | :ref:`name` readonly | The name of the layer. | +--------------------------------------------------------+-------------------------------------------------------------------------------------------------------+ | :ref:`opacity` readonly | The layer's master opacity (as a percentage). Range: 0.0 to 100.0. | +--------------------------------------------------------+-------------------------------------------------------------------------------------------------------+ | :ref:`parent` readonly | The object's container. | +--------------------------------------------------------+-------------------------------------------------------------------------------------------------------+ | :ref:`typename` readonly | The class name of the object. | +--------------------------------------------------------+-------------------------------------------------------------------------------------------------------+ | :ref:`visible` readonly | If true, the layer is visible. | +--------------------------------------------------------+-------------------------------------------------------------------------------------------------------+ | :ref:`xmpMetadata` readonly | XMP metadata associated with the Layer. | +--------------------------------------------------------+-------------------------------------------------------------------------------------------------------+ Methods ^^^^^^^ +--------------------------------------------+----------------------------------------------------+ | :ref:`duplicate` readonly | Duplicate this object. | +--------------------------------------------+----------------------------------------------------+ | :ref:`link` readonly | Links the layer with the specified layer. | +--------------------------------------------+----------------------------------------------------+ | :ref:`move` readonly | Move the object. | +--------------------------------------------+----------------------------------------------------+ | :ref:`moveToEnd` readonly | ... | +--------------------------------------------+----------------------------------------------------+ | :ref:`remove` readonly | Deletes this object. | +--------------------------------------------+----------------------------------------------------+ | :ref:`removeAll` readonly | Deletes all elements. | +--------------------------------------------+----------------------------------------------------+ | :ref:`resize` readonly | Scales the object. | +--------------------------------------------+----------------------------------------------------+ | :ref:`rotate` readonly | Rotates the object. | +--------------------------------------------+----------------------------------------------------+ | :ref:`translate` readonly | Moves the object relative to its current position. | +--------------------------------------------+----------------------------------------------------+ | :ref:`unlink` readonly | Unlinks the layer. | +--------------------------------------------+----------------------------------------------------+ .. container:: hide .. toctree:: :hidden: :maxdepth: 1 Layer/parent.rst Layer/typename.rst Layer/name.rst Layer/allLocked.rst Layer/blendMode.rst Layer/linkedLayers.rst Layer/opacity.rst Layer/visible.rst Layer/id.rst Layer/itemIndex.rst Layer/bounds.rst Layer/boundsNoEffects.rst Layer/xmpMetadata.rst Layer/move.rst Layer/duplicate.rst Layer/moveToEnd.rst Layer/remove.rst Layer/removeAll.rst Layer/unlink.rst Layer/link.rst Layer/translate.rst Layer/rotate.rst Layer/resize.rst