Mailing List AE-List@media-motion.tv ? Message #64528
From: David Torno <AE-List@media-motion.tv>
Subject: Re: [AE] cc2019 is eval() not working in expressions?
Date: Sun, 21 Oct 2018 10:28:54 -0700
To: After Effects Mail List <AE-List@media-motion.tv>
There are now two expression engines apparently. To improve it they had to replace it basically.

From the help page:
"After Effects uses JavaScript engine when evaluating expressions. The performance of evaluating expressions during renders can be up to 5x faster than the Legacy ExtendScript engine.

On Windows, After Effects uses the V8 open-source JavaScript engine. On macOS, After Effects uses the JavaScriptCore framework. Both of these engines provide a more modern version of JavaScript than available in ExtendScript, which only supports the 3rd Edition of the ECMA-262 Standard.

To choose whether a project uses the JavaScript engine or Legacy ExtendScript, in the Project Settings dialog, click the Expressions tab, and change the Expressions Engine option. Projects saved in previous versions of After Effects default to Legacy ExtendScript.

Improvements provided by the JavaScript engine

  • Higher mathematical precision in floating-point operations. 
  • Array and string methods from modern JavaScript can be used.
  • Other modern JavaScript objects like typed arrays, usage of keywords 'let' and 'const', and many other additions made in recent versions of the ECMA-262 Standard are available.

Differences between the JavaScript engine and ExtendScript

  • The syntax for if/else statements is strict in the JavaScript engine and need to be written for standardized JavaScript.
  • When accessing the indexes of characters on a Text Layer as an array, use text.sourceText.value[i] instead of text.sourceText[i].
  • Older snake_case expression methods  such as this_comp and to_world, which had been previously deprecated in ExtendScript) are not supported.
  • Simplified 'this(arg)' syntax is not supported.
"

https://helpx.adobe.com/after-effects/using/expression-language-reference.html



David Torno
818.391.6060
--------------------
www.sydefxink.com (work history)
https://vimeo.com/davidtorno (work samples & breakdowns)

"The most useless day is that in which we do not laugh"
-Charles Field

On Oct 21, 2018, at 8:22 AM, TIM THIESSEN <AE-List@media-motion.tv> wrote:

I haven't download cc2019 (os not up to snuff yet awaiting new compy) but I hear that among other things eval() doesn't work in expressions. Is there any documentation on the changes in the new Javascript engine - I haven't seen anything about using eval().


Timt

 
Subscribe (FEED) Subscribe (DIGEST) Subscribe (INDEX) Unsubscribe Mail to ListMaster