Class ToneOperatorInterface

3DS Max Plug-In SDK

Class ToneOperatorInterface

See Also: Class FPStaticInteface, Class ToneOperator.

class ToneOperatorInterface : public FPStaticInterface

Description:

This class is available in release 4.0 and later only.

This class allows plug-ins and the scripter to get access to the tone operator assigned to a scene. You can get a pointer to the interface using the global interface pointer in this manner:

ToneOperatorInterace* toneOpInt = static_cast<ToneOperatorInterface*>( GetCOREInterface(TONE_OPERATOR_INTERFACE));

If the return value is NULL, the running version of 3ds max doesn’t support tone operators. If the return value is not NULL, you can use these methods to perform some scene management.

Methods:

public:

Prototype:

virtual void OpenToneOperatorPanel()=0;

Remarks:

This method opens the tone operator panel UI. If the panel has been minimized, it is restored.

Prototype:

virtual void CloseToneOperatorPanel()=0;

Remarks:

This method closes the tone operator panel UI.

Prototype:

virtual void MinimizeToneOperatorPanel()=0;

Remarks:

This method minimizes the tone operator panel UI.

Prototype:

virtual ToneOperator* GetToneOperator() const = 0;

Remarks:

This method returns the current tone operator assigned to a scene. If no tone operator is assigned NULL is returned.

Prototype:

virtual void SetToneOperator(ToneOperator* op) = 0;

Remarks:

This method assigns a tone operator to the scene. To remove a tone operator, assign NULL. When a new tone operator is assigned the current operator is removed automatically.

Prototype:

virtual void RegisterToneOperatorChangeNotification(ToneChangeCallback callback, void* param) = 0;

Remarks:

This method registers a callback that is called when the tone operator is changed. Note the definition of ToneChangeCallback:

typedef void (*ToneChangeCallback)(ToneOperator* newOp, ToneOperator* oldOp, void* param);

Parameters:

ToneChangeCallback callback

The callback to register.

void* param

This parameter is passed to the callback function as the parameter argument when it is called.

Prototype:

virtual void UnRegisterToneOperatorChangeNotification(ToneChangeCallback callback, void* param) = 0;

Remarks:

This method un-registers a callback that was registered by RegisterToneOperatorChangeNotification. Note the definition of ToneChangeCallback:

typedef void (*ToneChangeCallback)(ToneOperator* newOp, ToneOperator* oldOp, void* param);

Parameters:

ToneChangeCallback callback

The callback to un-register.

void* param

This parameter is passed to the callback function as the parameter argument when it is called.