Retimer : Controller

Value > MAXWrapper > Controllers > Retimer

 

   

Animation Controllers - Quick Navigation

   

The Retimer Controller was introduced in 3ds Max 2013 as an alternative procedural EaseCurve controller.

It can be used in the EaseCurve track of any controller or as a Global Retimer Controller affecting the whole scene, accessible through the Interface: RetimerMan.

   

Interface: retimer

Properties:

<RetimerController>.numMarkers : integer : Read

Contains the number of markers in the Retimer controller.

Read-only.

   

<RetimerController>.numSpans : integer : Read

Contains the number of spans in the Retimer controller.

The spans are the ranges between markers. Thus, two markers define one span.

Read-only.

   

<RetimerController>.active : bool : Read|Write

Get/set the active state of the Retimer controller.

   

Methods:

<void><RetimerController>.SetNewMarker <time>time

Creates a new Marker at the specified time.

   

<void><RetimerController>.ExpandMarker <time>time <time>newTime

Expands the Marker from the time specified by the first argument to the new time specified by the second argument.

There must be a marker at the time specified by the first argument.

Expanding is the process of moving a marker from its original time to a new time, thus producing a retiming curve.

   

<void><RetimerController>.MoveMarker <time>time <time>newTime

Moves the Marker from the time specified by the first argument to the new time specified by the second argument.

Moving a Marker changes its original position before expanding (and thus retiming) the animation.

In other words, it adjusts the initial placement of the marker as opposed to moving the marker for retiming purposes.

   

<void><RetimerController>.RemoveMarker <time>time

Removes the Marker from the specified time.

   

<time by value array><RetimerController>.GetMarkerTimes()

Returns an array of all Marker times.

This is the list of the original positions of the markers before expanding them to produce animation retiming.

   

<time by value array><RetimerController>.GetExpandedMarkerTimes()

Returns an array of all expanded Marker times.

This is the list of the new positions of the markers that cause the retiming of the animation.

   

<enum><RetimerController>.GetSpanType <index>index

GetSpanType enums: {#linear|#easeIn|#easeOut}

Returns the type of the indexed Span.

   

<void><RetimerController>.SetSpanType <index>index <enum>type

type enums: {#linear|#easeIn|#easeOut}

Sets the Type of the indexed Span to the name value provided by the second argument.

   

<bool><RetimerController>.GetSpanLocked <index>index

Returns the locked state of the indexed Span as a boolean value.

   

<void><RetimerController>.SetSpanLocked <index>index <bool>type

Sets the locked state of the indexed Span to the boolean value provided by the second argument.

   

EXAMPLE

t = teapot() --create a teapot
--> $Teapot:Teapot001 @ [0.000000,0.000000,0.000000]
with animate on at time 100 t.pos = [200,0,0] --animate it 200 units along X over 100 frames
--> [200,0,0]	
rtc =RetimerMan.GetGlobalRetimer() --get the retimer controller
--> Controller:Retimer
addEaseCurve t.pos.controller[1].controller rtc --add the retimer as Ease Curve
--> OK
rtc.numMarkers --check the number of markers
--> 0
rtc.SetNewMarker 30f  --add a new marker on frame 30
--> OK
rtc.SetNewMarker 50f  --and another one on frame 50
--> OK
rtc.MoveMarker 30f 20f --changed my mind, I want it on 20, not 30
--> OK
rtc.ExpandMarker 50f 80f --now let's retime by stretching the range 20 to 50 by 30 frames
--> OK
rtc.GetMarkerTimes() --here are the original marker times
--> #(20f, 50f)
rtc.GetExpandedMarkerTimes() --and the new retimed marker times
--> #(20f, 80f)
rtc.numMarkers --now we have two markers
--> 2
rtc.numSpans --and we have one span between them
--> 1
rtc.GetSpanType 1 --let's check its type
--> #linear
rtc.SetSpanType 1 #easeOut --we can change it to slow down over time
--> OK
rtc.SetNewMarker 90f --but this gives us a jump on frame 80, so let's add another marker on 90
--> OK
rtc.SetSpanType 2 #easeIn --and set it to ease in to smooth it out
--> OK
rtc.GetSpanLocked 1 --let's check if the first span is locked
--> false
rtc.SetSpanLocked 1 true --and lock it
--> OK
rtc.RemoveMarker 20f --we could remove the first marker just to show we can
--> OK

See Also