Set Layer Properties
photopea_set_layer_propertiesUpdate layer properties such as opacity, blend mode, visibility, name, or locked state. Only specified properties are changed; others remain unchanged. First inspect current values with get_layers, then modify only what you need.
Instructions
Update one or more properties on a layer. Only specified properties are changed; others remain at their current values. Use get_layers to inspect current property values before modifying.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | Yes | Layer name (string) or index (number) | |
| opacity | No | Layer opacity percentage (0 = fully transparent, 100 = fully opaque) | |
| blendMode | No | Blend mode (e.g. normal, multiply, screen, overlay, darken, lighten, color-dodge, color-burn) | |
| visible | No | Layer visibility (true = visible, false = hidden) | |
| name | No | New display name for the layer | |
| locked | No | Whether the layer is locked (true = prevent edits, false = allow edits) |