PDA

View Full Version : scaleTime() question


Hobbs
01-04-2008, 05:04 PM
I'm working with the scaleTime() call in code, but considering its taking in a float, most of the results end up with key frames not returning in whole numbers.


example a key on 14f might become 12.2f


since from what i've seen in the reference i can only give a start frame, and end frame, and a float value, is there a way to make sure the result is always a whole number?

or am i going to have to go through a loop and round each frame by myself, which seems tedious.

Thanks for your time.

RustyKnight
01-06-2008, 02:54 AM
I'm working with the scaleTime() call in code, but considering its taking in a float, most of the results end up with key frames not returning in whole numbers.


example a key on 14f might become 12.2f


since from what i've seen in the reference i can only give a start frame, and end frame, and a float value, is there a way to make sure the result is always a whole number?

or am i going to have to go through a loop and round each frame by myself, which seems tedious.

Thanks for your time.This sounds like the default behaviour of the scaleTime operation...because time is actually measured in ticks, 4800 per second if I recall correctly...so in fact you are getting a whole number, in ticks.

So I think, if you want to clean up the time range, you will have to do it manually

Shane

CGTalk Moderation
01-06-2008, 02:54 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.