Skip to main content
Participating Frequently
Nov 11, 2024 8:14 PM UTC
Answered

Automation Blocks - Get property value that have an expression

Hello!

I'm trying to get a value from the Position property that have an expression which is modifing the original value to a new one, but whenever I use the Get Attribute type "Value" block, it gets the raw value instead the new one with the expression.

I even tried using a custom script block with the ".valueAtTime(currentTime, true)" to get value with expression but still no good.

Is there a way to actually get the current value of the property?

 

Thank you!

This topic is closed to new replies. Start a new post to keep the conversation going.
Mathias Moehl
Mathias MoehlCorrect answer
Community Expert
Nov 11, 2024 8:29 PM UTC

Actually, Automation Blocks returns the post expression value. I just did a quick check and on my machine it works as expected:

Here the pre-expression value is [50,50] and the expression adds 100 to both x and y.

Maybe you are accidentally retrieving the value of a wrong property or some other bug in your code?

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects

4 replies

Mathias Moehl
Community Expert
Mathias MoehlCommunity ExpertCorrect answer
Community Expert
Nov 11, 2024 8:29 PM UTC

Actually, Automation Blocks returns the post expression value. I just did a quick check and on my machine it works as expected:

Here the pre-expression value is [50,50] and the expression adds 100 to both x and y.

Maybe you are accidentally retrieving the value of a wrong property or some other bug in your code?

Translate
Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
Participating Frequently
Nov 11, 2024 8:54 PM UTC

yea! I just deleted everything and started from scratch, defenily it was something wrong with my code (as it's the case of 99% of the issues that happens haha)

thank you for the help!

Translate
Dan Ebberts
Community Expert
Community Expert
Nov 11, 2024 8:21 PM UTC

I think "true" gives you the pre-expression value. Try "false".

Translate
Participating Frequently
Nov 11, 2024 8:30 PM UTC

Yea, I tried both. Each returns a different value, but neither are correct.

Translate