Viewer object
app.activeViewer
The Viewer object represents a Composition, Layer, or Footage panel.
Example
This maximizes the active viewer panel, and displays its type if it contains a composition:
var activeViewer = app.activeViewer;
activeViewer.maximized = true;
if (activeViewer.type == ViewerType.VIEWER_COMPOSITION)
alert("Composition panel is active.");
Attribute List
| Attribute | Reference | Description |
|---|---|---|
| type | “Viewer type attribute” on page 190 | The type of content in the viewer. |
| active | “Viewer active attribute” on page 189 | When true, the viewer is focused. |
| maximized | “Viewer maximized attribute” on page 189 | When true, the viewer is at its maximized size. |
Method List
| Method | Reference | Description |
|---|---|---|
| setActive() | “Viewer setActive() method” on page 190 | Moves the viewer to front and places focus on it. |
active attribute
viewer.active
When true, indicates if the viewer panel is focused, and thereby frontmost.
Type: Boolean read-only
maximized attribute
viewer.maximized
When true, indicates if the viewer panel is at its maximized size.
Type: Boolean read/write.
setActive() method
viewer.setActive()
Moves the viewer panel to the front and places focus on it, making it active. Calling this method will set the viewer’s active attribute to true.
Parameters: None.
Returns: Boolean indicating if the viewer panel was made active.
type attribute
viewer.type
The content in the viewer panel.
Type: A ViewerType enumerated value read-only One of:
- ViewerType.VIEWER_COMPOSITION
- ViewerType.VIEWER_LAYER
- ViewerType.VIEWER_FOOTAGE