دليل المستخدم إلغاء

Expression errors

When an expression fails to evaluate, expression errors appear in a warning banner at the bottom of the Composition and Layer panels. After Effects does not disable the expression but continues to evaluate it. The warning banner is displayed as long as the expression fails to evaluate – that is, until the expression is either fixed or manually disabled.

The expression error UI

Here’s an example of what the expression error warning banner looks like:

An example expression error
An example expression error

A. Left or Right arrow buttons B. The Reveal Expression C. The Expand/Collapse Warning 

  • The Left or Right arrow buttons display the previous or next expression error when multiple expressions fail to evaluate.
  • The Reveal Expression (magnifying glass) button exposes the property with the failing expression in the Timeline panel. If the expression is in a different composition, that composition opens.
  • The Expand/Collapse Warning (up/down arrows) button shows or hides the error text.

The expression error text is one line only and is clipped to the width of the Composition panel.

To see the full expression error text

Select  next to the expression. The complete error appears in a dialog box.

Expression error dialog box
Expression error dialog box

To hide the warning banner

hide warning banner

Choose After Effects > Preferences > Scripting & Expressions (macOS) or Edit > Preferences > General (Windows) and disable Show Warning Banner When Project Contains Expressions Errors.

When this option is disabled, the warning banner remains hidden even when new expression errors occur.

Re-enable this option to view expression errors.

Reveal expression errors

If an expression cannot be processed, After Effects displays a message explaining the error and automatically disables the expression. A yellow warning icon appears next to the expression. Select the warning icon to view the error message again.

To show expressions that have errors, select one or more layers. Right-click (Windows) or Control-click (macOS) a selected layer in the Timeline panel. Choose Reveal Expression Errors from the context menu.

Some expressions rely on the names of layers or properties in your project. If you change the name of a layer or property that is involved in an expression, After Effects attempts to update the expression to use the new name. However, in some complex cases, After Effects is unable to automatically update the expression. In this case, the expression may produce an error message and you must update the expression yourself.

ملاحظة:

The expression may not work if you are running After Effects in a different language, or if you changed the names of the items (such as layers, effects, or other property groups). To enable the expression, modify the expression to use the new names or the strings that match the language in which you are running After Effects.

The examples in this document were created for the default state of After Effects running in English. Some examples in this document will not work without such modification.

Errors caused by precomposing layers

Precomposing multiple layers can cause expressions that refer to a property of one of the layers to produce an error. You have to update these expressions to refer to the layer within the new composition. This is especially a concern with expressions that use thisComp instead of referring to a composition by its name. (See About precomposing and nesting.)

ملاحظة:

The arguments for some effects in After Effects have changed from the arguments in previous versions. If you have existing expressions that use argument index references instead of argument names, update the expressions to use argument names.

More Expression resources

Now that you have understood some of the concepts behind expressions, come to the community for some real-life examples, and to share your work.

The AE Enhancers forum also provides many examples and much information about expressions, as well as scripts and animation presets.

احصل على مساعدة بشكل أسرع وأسهل

مستخدم جديد؟