Value > Time Data Values > Time Values |
The Time class implements animation time in MAXScript.
Time values reflect the properties of animation time in 3ds Max.
Resolution is in ticks, with 4800 ticks per second.
You can work with time as ticks, frames, h.m.s, or normalized time.
You can intermix numbers and time values in time computations defined below.
The rule is that numbers are always interpreted as frame counts, with floating point numbers specifying fractional frames.
The numbers are always converted to tick-based time values internally and so have an ultimate resolution of 4800 ticks per second.
You can do time arithmetic and comparisons using numbers as well as time values and convert between time and (frame) numbers using the as operator. See also Time Literals.
minutes/sec/frames/ticks
Active segment normalized time
2.5s -- 2.5 seconds 1m15s -- 1 minute 15 seconds 2m30s5f2t -- 2 minutes 30 seconds 5 frames 2 ticks 125f -- 125 frames 17.25f -- 17.25 frames 1f20t -- 1 frame 20 ticks 2:10.0 -- 2 minutes 10 seconds 0 frames (SMPTE) 0:0.29 -- 29 frames (SMPTE)
Time from normal fraction based on the current scene animation range:
Time as ticks.
Time as normalized fraction of active segment (scene animation range):
This is the inverse of the normTime constructor described earlier.
Compare time values for equality. Returns true if the two time values are equal, false if they are not.
Compare time values for non-equality. Returns true if the two time values are not equal, false if they are equal.
Returns true if the first time value is greater than the second time value, false if it is less or equal to the second time value.
Returns true if the first time value is greater or equal to the second time value, false if it is less than the second time value.
Returns true if the first time value is less than the second time value, false if it is greater than or equal to the second time value.
Returns true if the first time value is less than or equal to the second time value, false if it is greater than the second time value.
You can coerce a time value to an Integer or Float number - you get the time in ticks:
Generates a random time value in the range defined by the two time values.
Returns the absolute value of the time value.
Some of the examples above refer to system global variables. See 3ds Max System Globals for more details.