Animation Editor

Expressions

The value of a metadata key available in one of the inputs of a node or Timeline FX can be linked to a channel via an expression.

The expression can be created in two different ways:

  1. By manually typing the expression.
  2. By using the Link Metadata Key option.

Manually Typing the Expression

To manually create the link:

  1. Select the channel to create the link on.

  2. Either:

    • Click Expression in the Animation menu.
    • Select Expression in the channel's context menu opened from the Animation hierarchy list.
  3. In the text field, type the expression using the following syntax: metadata(<name of the metadata key>).

    The name of the metadata key is case-sensitive, therefore the expression will not work if the character casing is not identical.

By default, the key is fetched from the clip connected to the first input socket of the node or Timeline FX. To use a key in a specific input, add the input name as a second argument in the expression, like this: metadata(<name of the metadata key>, <name of the input socket>).

If the metadata key has a space in its name, the name must be wrapped in apostrophes like this: metadata('<name of the metadata key>').

To access a value inside a vector like 'dataWindow', add a slash between the name of the key and the desired value, like this: metadata('dataWindow/Max y').


Use the Link Metadata Key entry in the Link Special submenu of a channel's or numeric field's context menu to create an expression linking the channel to a metadata key using the string currently available in the clipboard. To add the string to the clipboard, display the Metadata list in a Clip, Metadata node, or Source Metadata Timeline FX and select Copy Key in the context menu opened from a cell under the Key column.

The expression resulting from using this entry is metadata('<string in the clipboard>').

Since there is no validation made on the string used, make sure that:

  1. The string is a valid metadata key. To help with this, the string currently available in the clipboard is shown in parentheses next to Link Metadata Key within the context menu and drop-down.
  2. The source with the metadata key is connected to the tool containing the channel on which the expression is set.
  3. The input argument is added if the key comes from a clip that is not connected to the first input socket of the tool. See the Manually Typing the Expression section above for more details.


Output a Channel as a Metadata Key

The content of an animation channel can be output in a metadata key.

To output an animation channel as a metadata key:

  1. Open the context menu of an animation channel.

  2. Select Output Channel as Metadata Key.

    • A blue checkmark icon appears next to the option inside the context menu.
    • A "m" icon appears next to the channel inside the Animation view.
    • A light grey dot appears on top of the Batch node or on the right of a node in Action, GMask Tracer, or Image in the Schematic views.

A metadata key with the channel's name and its animated value is output from the Batch node. In Action and GMask Tracer, the metadata keys are output from an output socket only if the object is part of that output.

To stop an animation channel from outputting a metadata key:

  1. Open the context menu of an animation channel.
  2. Select Output Channel as Metadata Key.

Filtering

To display only the animation channels outputting metadata, select the Metadata Output criterion inside the Animation Filter Criteria window, accessed by selecting Set Criteria... in the Filtering option drop-down.

For more information, see Filtering Channels in the Animation Editor.