Skip to main content
VodBox
Participating Frequently
September 28, 2022

Expressions with posterizeTime fail to posterize if expression returns a property directly

  • September 28, 2022
  • 6 replies
  • 274 views
AE Version: 17.6.0 (Build 46)

Reproduction Steps:
- Create a New Project
- Add a new layer
- Animate the position property with keyframes
- Apply the following expression to position:
posterizeTime(6); transform.position

Expected Behavior:
Position animation is posterized.

Actual Behavior:
Position animation is not posterized.

Additional Notes:
The failure to posterize only occurs in cases where the expression returns a property directly. For instance, the following expression...

posterizeTime(6); transform.position + [0, 0]

... does correctly posterize the position animation, despite the fact that it should be returning an identical result. This can be seen in my first example AEP file.

The property being returned does not have to be itself. For instance, if the expression returns the position value from another layer, or if it returns the value of a Point Expression Control, it'll again fail to posterize. This happens even if the layer is 3D and pointing to a 2D vector property. The second example AEP has the layers pointing to the position property of a Null layer, and still exhibits the issue.

This does not happen with just position properties, although is the quickest and easiest to demonstrate. This will also happen with things like Character Selectors in Text Animators, where this issue was first observed.

My suspicion is that the checker/part of the JavaScript compiler that determines if an expression needs to be run or can be side-stepped, sees that a property is being directly returned in all paths, chooses not to run the expression and uses the value of the property directly, despite the fact that the expression has side effects when ran.

6 replies

VodBox
VodBoxAuthor
Participating Frequently
November 26, 2022

This post is about a very specific bug that happens within an already applied expression. If you don't know how to apply expressions or how to view/edit them, then it is highly unlikely this is a bug you're running into, given it relies on you having added one.

Participant
November 26, 2022
Hi there,
I don't know how to write an expression. I only know how to click and drag
the effect onto the layer I want to effect to go onto and set a key
frame using the interface.
VodBox
VodBoxAuthor
Participating Frequently
November 26, 2022

The workaround has you writing the expression like this...

 

posterizeTime(6);

value

Participant
November 26, 2022

Hi there, I am having this issue and i do not understand how to apply the work around. I am a beginner who only understands how to apply affects and keyframe them. Can someone walk me through how to do this?

VodBox
VodBoxAuthor
Participating Frequently
September 28, 2022
In the AE 2022 release build released just recently, this bug is still present. The same workaround still works to sidestep the issue.
JohnColombo17100380
Community Manager
Community Manager
September 28, 2022
Hi Dillon,

Thank you for reporting this issue. We are able to reproduce it as well with the steps you provided ( thanks for those! ). We will be taking a look at possible causes and solutions.

In the meantime, a workaround is to add ".value" to the end of the property reference e.g. "transform.position.value" or, if the expression is referring to its own property as in your example, simply use "value" by itself to achieve posterization of the pre-expression keyframed values.

Thanks again for reporting this bug,
- John, After Effects Engineering Team