Skip to main content
Inspiring
February 29, 2024
Question

time remapping script recently broken - rounding issue, has something changed?

  • February 29, 2024
  • 2 replies
  • 238 views

hi all

 

I have a time remapping script that I have been using for literally years that has suddenly stopped working properly.  The issue I'm having is the values I set with the script are correct, they're just no longer being applied properly to the time remap keys.

 

If I set a value and then check to see what the property value is, I get some very odd, close but not exact number, and in the UI the non-exact number is getting rounded, often to an incorrect frame.... so annoying!!! I've never had this problem before. It is like something has recently changed internally with the time calculations.

 

Any suggestions on how I might resolve this or possible trouble shooting options would be greatly appreciated...

 

ps. here is a snippet from the debug console showing the value i'm setting and then what Ae has actually set (or at least what it reports being the current time remap value) 

I generally use 25fps as it so much easier to work with frame durations of 0.04 secs but I realise Ae is doing internal calculations using ticks or some such. 

 

setting time remap to 1095
remap value = 1095
 
setting time remap to 1095.04
remap value = 1095.0400390625
 
setting time remap to 1095.08
remap value = 1095.07995605469
 
setting time remap to 1095.12
remap value = 1095.11999511719
 
setting time remap to 1095.16
remap value = 1095.16003417969
 
setting time remap to 1095.2
remap value = 1095.19995117188

 

 

This topic has been closed for replies.

2 replies

Legend
February 29, 2024

Calculations involving decimal numbers can lead to rounding errors or precision issues.

 

 

 

512.04 / 0.04 = 12800.999999999998

512.04 * 100 / 4 = 12801

 

 

 

Inspiring
February 29, 2024

so this is slightly embarrassing (and even more frustrating) I was doing some further digging around and came across an old thread... that I started... 8 years ago!... doh - https://community.adobe.com/t5/after-effects-discussions/rounding-weirdness-when-time-remapping-is-over-512-seconds/m-p/7998089

So I guess I really am up the proverbial creek without a paddle.

if anyone has a cunning way to circumvent the 512 rounding horizon I would love to hear it.