Layer states
Layer states, or simply states, allow you to instantly set the visibility and layer effects of multiple layers.
After a query is applied: German and English version visibility.
Before a query is applied: German and English version visibility.
There are two types of state:
- A regular state captures the visibility of and layer effects applied to layers at the time the state is added to a document.
- A query specifies criteria—any combination of a layer's tag color, type, name and lock status—that determine the visibility of layers. For example, you may want to hide all layers that have a tag color of red and show all other layers.
States of each type can be given a name.
With several states or queries added to the States panel, you can quickly compare different design choices for your document, such as alternative masks, adjustments, live filters and even entirely different layer content.
Understanding state and query entries
Entries on the States panel for each type of state provide different information about how they will affect your document's layers.
Each state entry displays:
- A thumbnail representation of the state.
- The state's name.
- The number of layers for which information is captured in the state.
Each query entry displays the query's name, and specifies the criteria that must all be met in order to set your chosen layer visibility. You can specify any combination of the available attributes. Unselected attributes are ignored.
Example scenarios
The application of states and queries can be used in a number of professional scenarios. Apart from language content previews above, more could include:
- Switching the visibility of an underlying image on and off while tracing: particularly useful when learning how to draw.
- Preparing a number of versions of mock-up designs for promotional campaigns.
- Presenting variations of content layout options on artboards.
Matching patterns in layer names
You can use regular expressions to match layer names that follow a pattern. For example:
- The regular expression A-[0-9]{3}- will match layers whose name starts with the letter A (in either case), a hyphen, a sequence of three numbers, and another hyphen, such as a-230- but not C-230- or A-2300-.
- The regular expression [.]*-M_DOOR$ will match all layers whose name ends with M_DOOR, e.g. A-325-M_DOOR and Z-124-M_DOOR but not A-325-M_DOOR_FRAME.
Detailed information about the capabilities of regular expressions is available on the Web.
Controlling the scope of affected layers
When adding or updating a state or applying a state or a query, use the Scope setting to determine how broadly information is captured from or affects the current visibility of your document's layers, respectively.
The scope can be the whole document, the current selection on the Layers panel, or an individual spread.
This allows you to focus your use of states on a specific portion of your work. For example, layers whose tag color is orange but only if they are nested within a selected layer.
How to add a state
How to add a query
How to apply a state
How to apply a query
How to set whether a state's captured visibility/layer effects will be applied
How to update a state
SEE ALSO:
How would you rate the help you received from this article?