• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Get the duration of animation if set solely with expressions

Participant ,
Sep 06, 2017 Sep 06, 2017

Copy link to clipboard

Copied

How can you determine when the animation ends, starts (duration) if it is set with expressions?

To make things worse, the expression is precompiled(not sure if that is the word). By that I mean it uses eval function with some "nonsense" inside it.

Something like this: eval('@JSXBIN@ES@2.0@MyBbyBn0AKJAnABjzGjPjGjGjTjFjUBfEEjzGjFjGjAndSoOn');

I've been told that I need to calculate the keyframes, but didn't really get this instruction. Animation->Keyframe Assistant->Convert Expression to Keyframes returns keyframe on every frame, (and also breaks the animation) so that isn't really helpful.

TOPICS
Scripting

Views

296

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Sep 06, 2017 Sep 06, 2017

Copy link to clipboard

Copied

Expressions do not have duration. They are executed at each frame of the animation.

If you need to start/stop expression in time, you have to build some logic into it.

Here's a small snippet that set's layer position if time is between 1 and 2 seconds. Otherwise it resets to default value.

if (time > 1 && time < 2) {

  [100, 100];

} else {

  value;

}

eval('@JSXBIN@ES@2.0@MyBbyBn0AKJAnABjzGjPjGjGjTjFjUBfEEjzGjFjGjAndSoOn') is not a nonsense - it's a compiled ExtendScript script wrapped into eval() function. You can compile scripts/expressions with ExtendScript Tool Kit, this way the output string is not user-friendly, meaning end user cannot change/alter it. If expressions developer didn't want you to change anything in it - you will not be able to, unless you back engineer JSXBIN to JSX.

Convert Expression to Keyframes does what it says - it bakes expression to keyframes, nothing more nothing less.

Again, if you need to restrict expressions evaluation to some condition (period of time, between keyframes, between markers etc) you will have to build that logic yourself. If you are new to expressions, please look for Dan Ebberts​ tutorials online. It's the best place you can learn expressions.

Cheers.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Sep 06, 2017 Sep 06, 2017

Copy link to clipboard

Copied

LATEST

It's not clear what  your problem actually is.
It looks like you've bought a script or template that uses this encrypted expression.

If that's the case, i dont think you can do anything, other than contact the person who made that utility and ask to add a "change animation start time/duration" feature. It's wierd that's it's not there already though.

The solution you were provided can work that way: convert to keyframes, select all keyframes, then offset them all in time. Quite uggly...

Xavier

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines