double precision woes

What type of scripts do you need?

Moderator: byronnash

Post Reply
vidjuheffex
Posts: 18
Joined: May 6th, 2012, 2:11 pm

okay this is a bit dense but here goes:

1. Our facility wishes to start all frame ranges at 1001.

2. I have a precomposing script that goes down and precomposes each shot. It also sets (or tries to set) the start frame of these children comps to 1001.

3. I have used:

Code: Select all

var oneThousandOneToSec = 1001 * activeItem.frameDuration;
To try and get that value in seconds. (activeItem being the shot comp.)

Here's the problem, let's say I set the comp manually to start at 1001, this value as returned by .displayStartFrame is 41.7083750417084... which is to say 1000 * activeItem.frameDuration.

So now I write:

Code: Select all

activeItem = app.project.activeItem;
activeItem.displayStartTime = 1000 * activeItem.frameDuration
(whose result per extendscript is 41.7083750417084)

however now the comp starts at 1000 not 1001?

Ok, so lets all 1 frame duration to the displayStartTime, that should make it 1001? Or how about multiplying 1001 * activeItem.frameDuration.... both of these result in comps that start at 1002!!

This is just the tip of the iceberg in weirdness here and will discuss further if anyone is curious are has some insight.

Final thing, I can get it to start at 1001 by taking:

Code: Select all

(1001 * activeItem.frameDuration).toFixed (2)
this amount to 41.75 as a second start which is fine when rendering locally but when submitting them to a farm these crash while those which are set by hand process fine. Those set by hand to frame 1001 evaluate to 41.708sec, those which are programmatically set to start at 41.708 sec evaluate to start at frame 1000; Project setting indicated to start counting at 1, parent and all child comps say (from 1) next to all counters etc.

Please. Someone. Before I pull out all of my hair.
Post Reply