XM Magdalena 3D print, GGeorgy (3D)
LC #42 Pipers Alley

View Full Version : how do i get a variable to represent ticks

09-09-2005, 03:23 PM
I have a script reading a text file then it animates objects using that data

Working with frames this script works fine

But I need my variable T1 to represent ticks not frames.

I have the time configuration set to MM:SS: TICKS

T1 = click*ppq/4800 -- Ppq=anything from 96 to 2082 - Click=anything from 0 to 9999999

at time T1 rotate theObj rot_key -- rotate object at tick T1

How do I get T1 to represent Ticks? right now it sets frames I have read the help files but cant quite work out the answer

Thanks for Reading

09-09-2005, 04:04 PM
at time (execute(T1 as string + "t")) rotate theObj rot_key

I think that what you're trying to do. If you just give "at time" a number it's going to assume that it's a frame value.

Hope it helps.

09-09-2005, 04:07 PM
Thanks martinez I will give that a go :)

That works fine :) Thanks again :)

09-09-2005, 09:23 PM
Thanks martinez I will give that a go :)

That works fine :) Thanks again :)

Some simple time conversion rules without using Execute:

Integer to Frames:
theValue = 100
theValue as time --> 100f

Float to Frames:
theValue = 100.5
theValue as time --> 100.5f

Integer to Frames to Ticks:
theValue = 100
(theValue as time) as integer --> 16000 (when TicksPerFrame is 160 @ 30 fps)
theValue*TicksPerFrame --> 16000

Full Frames to Float
theFrames = 100f
theFrames.frame --> 100.0

Float Frames to Float
theFrames = 100.5f
theFrames.frame --> 100.5

Float Frames to Ticks
theFrames = 100.5f
theFrames as float --> 16080.0 (because 80 ticks are 1/2 frame @160 ticks per frame)

Frames To Integer
theFrames = 100f
theFrames.frame as integer --> 100

Ticks To Integer
theTicks = 16000
theTicks/TicksPerFrame --> 100 (assuming TicksPerFrame == 160 @ 30 fps)

09-10-2005, 05:05 AM
that list will help me out , Thanks Bobo :)

CGTalk Moderation
09-10-2005, 05:05 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.