Focus Management with After Effects

FocusZone and FocusZoneRef allow you to explicitly set where you want focus to enter in a view or Composition, and where you’d like the focus to go back to when returning to a view or Composition. FocusZoneRef extends a CYIFocusZoneView in an After Effects Composition. Using entryMode, you can determine where focus enters in a view, and what is given initial focus; depending on the specific mode set, you can control where the focus lands when returning to a view.

You can access Focus Zone within the Properties Panel, as a subtype under Container, and set the entryMode option from there. See image below:

Screen capture of the You.i AE Panel showing Focus Zone properties.

The entryMode prop offers four possible modes: normal, none, last, and fixed. These map to CYIFocusZoneView::EntryMode options in the Properties Panel as follows:

  • RestoreLastFocus maps to last
  • Standard maps to normal
  • PreventEntry maps to none

As fixed is a new mode that doesn’t have a complement within CYIFocusZoneView::EntryMode to map to, there is no option to set it in After Effects; it must be added in JavaScript. You’ll also need to apply initial focus on FocusZoneRef in JavaScript; there’s no means to do this within After Effects. Refer to FocusZoneRef for a code sample illustrating this.