List of Addition Controller Related Functions

3DS Max Plug-In SDK

List of Additional Controller Related Functions

See Also: Class Control, Class StdControl.

Description:

The following functions may be used to control the playing and suspension of animation, get and set the start and end animation times, and returns new instances of default controllers of various types.

Functions:

The functions below allow a developer to control the state of the 'Animate' button in the user interface, and also set if animate mode is on or off. The pseudo code below demonstrate how these methods might be used. If you need to do something associated with a controller but did not want keys to be generated you could write:

SuspendAnimate();

AnimateOff();

// do some things...

ResumeAnimate();

This ensures that animate mode is unchanged after you're through. The animate button never changes appearance so the user doesn't have to be aware that anything is happening.

Prototype:

int Animating();

Remarks:

Determines if the animate button is on. Returns nonzero if on; zero if off.

Prototype:

void AnimateOn();

Remarks:

This method logically turns animating on but does not change the appearance of the button.

Prototype:

void AnimateOff();

Remarks:

This method logically turns animating off but does not change the appearance of the button.

Prototype:

void SuspendAnimate();

Remarks:

Suspend the animation from running. This method uses a stack so if several calls are made to the SuspendAnimate(), they must all be resumed before animation will resume.

Prototype:

void ResumeAnimate();

Remarks:

Resume suspended animation. The method SuspendAnimate() uses a stack so if several calls are made to SuspendAnimatie(), they must all be resumed using this method before the animation will resume.

Prototype:

TimeValue GetAnimStart();

Remarks:

Retrieves the start time of the animation.

Prototype:

TimeValue GetAnimEnd();

Remarks:

Retrieves the end time of the animation.

Prototype:

void SetAnimStart(TimeValue s);

Remarks:

Sets the start time of the animation.

Prototype:

void SetAnimEnd(TimeValue e);

Remarks:

Sets the end time of the animation.

Prototype:

Control *NewDefaultFloatController();

Remarks:

Returns an instance of the default float controller.

Prototype:

Control *NewDefaultPoint3Controller();

Remarks:

Returns an instance of the default Point3 controller.

Prototype:

Control *NewDefaultMatrix3Controller();

Remarks:

Returns an instance of the default Matrix3 controller.

Prototype:

Control *NewDefaultPositionController();

Remarks:

Returns an instance of the default position controller.

Prototype:

Control *NewDefaultRotationController();

Remarks:

Returns an instance of the default rotation controller.

Prototype:

Control *NewDefaultScaleController();

Remarks:

Returns an instance of the default scale controller.

Prototype:

Control *NewDefaultColorController();

Remarks:

Returns an instance of the default color controller.

Prototype:

Control *NewDefaultBoolController();

Remarks:

Returns an instance of the default boolean controller.

Prototype:

Control* CreateInterpFloat();

Remarks:

Creates and returns a pointer to a new Bezier float controller.

Prototype:

Control* CreateInterpPosition();

Remarks:

Creates and returns a pointer to a new Bezier position controller.

Prototype:

Control* CreateInterpPoint3();

Remarks:

Creates and returns a pointer to a new Bezier Color controller.

Prototype:

Control* CreateInterpRotation();

Remarks:

Creates and returns a pointer to a new TCB Rotation controller.

Prototype:

Control* CreateInterpScale();

Remarks:

Creates and returns a pointer to a new Bezier Scale controller.

Prototype:

Control* CreatePRSControl();

Remarks:

Creates and returns a pointer to a new PRS transform controller.

Prototype:

Control* CreateLookatControl();

Remarks:

Creates and returns a pointer to a new Look At transform controller.

Prototype:

void SetDefaultController(SClass_ID sid, ClassDesc *desc);

Remarks:

Sets the default controller of the specified type to the controller whose ClassDesc is passed.

Parameters:

SClass_ID sid

The Super Class ID. See List of Super Class IDs.

ClassDesc *desc

Points to the Class Descriptor for the controller. See Class ClassDesc.

Prototype:

ClassDesc *GetDefaultController(SClass_ID sid);

Remarks:

Returns a pointer to the Class Descriptor for the default controller of the specified type.

Parameters:

SClass_ID sid

The Super Class ID. See List of Super Class IDs.

Prototype:

void SetDefaultColorController(ClassDesc *desc);

Remarks:

Sets the default Color controller.

Parameters:

ClassDesc *desc

Points to the Class Descriptor for the controller. See Class ClassDesc.

Prototype:

void SetDefaultBoolController(ClassDesc *desc);

Remarks:

Sets the default Boolean controller.

Parameters:

ClassDesc *desc

Points to the Class Descriptor for the controller. See Class ClassDesc.

Prototype:

void ApplyScaling(Matrix3 &m, const ScaleValue &v);

Remarks:

This method may be used to apply a ScaleValue to the specified Matrix3. This is used in controller implementation of GetValue() when the GetSetMethod is CTRL_RELATIVE and the controller is a scale controller.

The global functions below provide access to the default tangent types for both the Bezier and TCB controllers.

Prototype:

void GetBezierDefaultTangentType(int &in, int &out);

Remarks:

This function is available in release 2.0 and later only.

Retrieves the default tange types for the Bezier controller.

Parameters:

int &in

The in tangent value.

int &out

The out tangent value.

Prototype:

void SetBezierDefaultTangentType(int in, int out);

Remarks:

This function is available in release 2.0 and later only.

Sets the default tange types for the Bezier controller.

Parameters:

int &in

The in tangent value.

int &out

The out tangent value.

Prototype:

void GetTCBDefaultParams(float &t, float &c, float &b, float &easeIn, float &easeOut);

Remarks:

This function is available in release 2.0 and later only.

Retrieves the default tange types for the TCB controller.

Parameters:

float &t

The tension setting.

float &c

The continuity setting.

float &b

The bias setting.

float &easeIn

The ease in value.

float &easeOut

The ease out value.

Prototype:

void SetTCBDefaultParams(float t, float c, float b, float easeIn, float easeOut);

Remarks:

This function is available in release 2.0 and later only.

Sets the default tange types for the TCB controller.

Parameters:

float t

The tension setting.

float c

The continuity setting.

float b

The bias setting.

float easeIn

The ease in value.

float easeOut

The ease out value.