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

property speed expression/script

Explorer ,
Jun 24, 2023 Jun 24, 2023

Copy link to clipboard

Copied

in the expressions the position property has speed attribute but not in the script. Is there a way to get the speed of a property in script? And can we get the avarage speed exactly?

TOPICS
Expressions , Scripting

Views

307

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

correct answers 1 Correct answer

Community Expert , Jun 24, 2023 Jun 24, 2023

You could have your script temporarily add an expression, and then harvest the speed value and delete the expression. Or, you could approximate it by using .valueAtTime() with your target time and again with the same time plus a tiny increment and do the math to calculate the difference divided by the time interval. Something like that. But no, you don't have those tools directly available in scripting.

Votes

Translate

Translate
Community Expert ,
Jun 24, 2023 Jun 24, 2023

Copy link to clipboard

Copied

I am not sure what you are trying to accomplish. What "speed" attribute are you talking about and how are you trying to use it?

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
Explorer ,
Jun 26, 2023 Jun 26, 2023

Copy link to clipboard

Copied

just wanted to make a script where I needed it. in the expression type position.speed, you will see

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
Community Expert ,
Jun 24, 2023 Jun 24, 2023

Copy link to clipboard

Copied

You could have your script temporarily add an expression, and then harvest the speed value and delete the expression. Or, you could approximate it by using .valueAtTime() with your target time and again with the same time plus a tiny increment and do the math to calculate the difference divided by the time interval. Something like that. But no, you don't have those tools directly available in scripting.

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
Explorer ,
Jun 26, 2023 Jun 26, 2023

Copy link to clipboard

Copied

Thank you very much, the temporary expression method seems the most sensible.

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
Explorer ,
Jun 26, 2023 Jun 26, 2023

Copy link to clipboard

Copied

LATEST

And do you know how to do the operation like you ctrl/cmd click the eased keyframe and remove the eases, how to do that with script? It automatically sets the speed of the keyframe to the average speed, which I can't set with changing the keyframe eases with setTemporaleEaseAtKey() method because I don't know the average speed. I think the easiest way would be the to do it with command ID if there is sth like that.

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