Controller Ease and Multiplier Curve Functions
 
 
 

Value > MAXWrapper > Controllers > Ease and Multiplier Curve Functions

 

   

Animation Controllers - Quick Navigation

   

addEaseCurve <controller> [ <float_controller> ] 	 

Adds an ease curve to the specified controller. You may provide an optional float controller for the curve or have the function generate a default float controller for you. When you add a ease curve in Track View, keys are automatically created at the beginning and end of the current animation range. The addEaseCurve() method does not generate these keys, so you will need to add them to the ease curve controller.

   

deleteEaseCurve <controller> <index_integer>   

Deletes the indexed ease curve from the controller. The indexes are 1- based and correspond to the order in which the curves were originally added to the controller.

   

numEaseCurves <controller> 

Returns the number of ease curves currently operating on the controller.

   

applyEaseCurve <controller> <time> 

Applies the combined ease curves in the specified controller to the given time value, returning the transformed time.

   

addMultiplierCurve <controller> [ <float_controller> ] 

Adds a multiplier curve to the specified controller. You may provide an optional float controller for the curve or have the function generate a default float controller for you. When you add a ease curve in Track View, keys are automatically created at the beginning and end of the current animation range. The addMultiplierCurve() method does not generate these keys, so you will need to add them to the ease curve controller.

   

deleteMultiplierCurve <controller> <index_integer> 

Deletes the indexed multiplier curve from the controller. The indexes are 1- based and correspond to the order in which the curves were originally added to the controller.

   

numMultiplierCurves <controller> 

Returns the number of multiplier curves currently operating on the controller.

   

getMultiplierValue <controller> <time> 

Returns the combined (float) value of the multiplier curves in the specified controller at the given time value.

Associated Properties

If an Ease Curve has been assigned to a controller, the following controller-related sub-property is available:

   

<controller>. Ease_Curve -- the controller’r s ease curve value 

If an Ease Curve has been assigned to a controller, the following controller-related sub-property is available:

   

<controller>. Multiplier_Curve -- the controller’r s multiplier curve value 
Note

The values stored in an Ease Curve controller are stored as integer time ticks.

The following script shows example usages of some of the above methods.

EXAMPLE

--controller test bed 3
b=box height:10
at time 5 animate on b.height=50
at time 10 animate on b.height=100
bhc=b.height.controller
ec=bezier_float()
at time 0 animate on ec.value = 0
at time 100 animate on ec.value=100*ticksPerFrame
setBeforeORT ec #linear
setAfterORT ec #linear
addEaseCurve bhc ec
applyEaseCurve bhc 50
addEaseCurve bhc ec
numEaseCurves bhc
deleteEaseCurve bhc 2
numEaseCurves bhc
at time 50 bhc.ease_curve.value
mc=bezier_float()
at time 0 animate on mc.value = 1
at time 100 animate on mc.value = 2
addMultiplierCurve bhc mc
at time 50 b hc.multiplier_curve
See Also