class MUiMessage

Jump to documentation

: public MMessage UI messages (OpenMayaUI) (OpenMayaUI.py)

Inheritance:

MUiMessage < MMessage

public members:

static MCallbackId addUiDeletedCallback ( const MString & uiName, MMessage::MBasicFunction func, void * clientData = NULL, MStatus * ReturnStatus = NULL )
static MCallbackId addCameraChangedCallback ( const MString & panelName, MMessage::MStringNode func, void * clientData = NULL, MStatus * ReturnStatus = NULL )
static MCallbackId add3dViewDestroyMsgCallback ( const MString & panelName, MUiMessage::MStringFunction func, void * clientData = NULL, MStatus * ReturnStatus = NULL )
static MCallbackId add3dViewPreRenderMsgCallback ( const MString & panelName, MUiMessage::MStringFunction func, void * clientData = NULL, MStatus * ReturnStatus = NULL )
static MCallbackId add3dViewPostRenderMsgCallback ( const MString & panelName, MUiMessage::MStringFunction func, void * clientData = NULL, MStatus * ReturnStatus = NULL )

Inherited from MMessage:

public members:

static MStatus removeCallback ( MCallbackId id )
static MStatus removeCallbacks ( MCallbackIdArray &ids )
static MCallbackId currentCallbackId ( MStatus * ReturnStatus = NULL )
static MStatus nodeCallbacks ( MObject & node, MCallbackIdArray & ids )
static void setRegisteringCallableScript ()
static bool registeringCallableScript ()
static MStatus removeCallbacks ( MIntArray &ids )
static MStatus nodeCallbacks ( MObject & node, MIntArray & ids )

Documentation

UI messages (OpenMayaUI) (OpenMayaUI.py)
Description

This class is used to register callbacks to track the deletion of UI objects.

The first parameter passed to the add callback method is the name of the UI that will trigger the callback.

The method returns an id which is used to remove the callback.

To remove a callback use MMessage::removeCallback.

All callbacks that are registered by a plug-in must be removed by that plug-in when it is unloaded. Failure to do so will result in a fatal error.

Functions

MCallbackId MUiMessage:: addUiDeletedCallback ( const MString & uiName, MMessage::MBasicFunction func, void * clientData, MStatus * ReturnStatus )
Description

This method registers a callback for UI deleted messages.

The callback function will be passed any client data that was provided when the callback was registered.

Arguments

  • ui the name of the UI object to register the callback for
  • func the callback function
    • clientData User defined data passed to the callback function
  • clientData User defined data that will be passed to the callback function
  • ReturnStatus status code

Return Value

  • identifier used for removing the callback.

Status Codes

  • MS::kSuccess Operation succeeded
  • MS::kUnknownParameter The named UI object could not be found
  • MS::kInsufficientMemory No memory available
  • MS::kFailure Error adding callback

MCallbackId MUiMessage:: addCameraChangedCallback (const MString & panelName, MMessage::MStringNode func, void * clientData , MStatus *ReturnStatus )
Description

This method registers a callback for cameras being changed in 3d views. The callback is called when the camera changes for the given panel, not when attributes on the panel's camera change.

The callback function will be passed any client data that was provided when the callback was registered.

Arguments

  • func the callback function
    • panelName The name of the panel that had the camera change.
    • camera The current camera used by the panel.
    • clientData User defined data passed to the callback function
  • clientData User defined data that will be passed to the callback function
  • ReturnStatus status code

Return Value

  • identifier used for removing the callback.

Status Codes

  • MS::kSuccess Operation succeeded
  • MS::kUnknownParameter The named UI object could not be found
  • MS::kInsufficientMemory No memory available
  • MS::kFailure Error adding callback

MCallbackId MUiMessage:: add3dViewDestroyMsgCallback ( const MString & panelName, MUiMessage::MStringFunction func, void * clientData , MStatus * ReturnStatus )
Description

This method registers a callback for when a particular 3d view gets destroyed. The callback is called before the destruction of the view.

The callback function will be passed any client data that was provided when the callback was registered.

Arguments

  • func the callback function
    • panelName The name of the panel that contains the 3d view.
    • clientData User defined data passed to the callback function
  • clientData User defined data that will be passed to the callback function
  • ReturnStatus status code

Return Value

  • identifier used for removing the callback.

Status Codes

  • MS::kSuccess Operation succeeded
  • MS::kUnknownParameter The named UI object could not be found
  • MS::kInsufficientMemory No memory available
  • MS::kFailure Error adding callback

MCallbackId MUiMessage:: add3dViewPreRenderMsgCallback ( const MString & panelName, MUiMessage::MStringFunction func, void * clientData, MStatus * ReturnStatus )
Description

This method registers a callback for when a particular 3d view is about to render it's contents. It is called before the scene is drawn, but after the background has been drawn.

The callback function will be passed any client data that was provided when the callback was registered.

Arguments

  • func the callback function
    • panelName The name of the panel that contains the 3d view.
    • clientData User defined data passed to the callback function
  • clientData User defined data that will be passed to the callback function
  • ReturnStatus status code

Return Value

  • identifier used for removing the callback.

Status Codes

  • MS::kSuccess Operation succeeded
  • MS::kUnknownParameter The named UI object could not be found
  • MS::kInsufficientMemory No memory available
  • MS::kFailure Error adding callback

MCallbackId MUiMessage:: add3dViewPostRenderMsgCallback ( const MString & panelName, MUiMessage::MStringFunction func, void * clientData , MStatus * ReturnStatus )
Description

This method registers a callback for when the 3d view is about to display it's rendered contents to the viewport. It is called for every refresh of the view, after the scene is drawn, but before any 2d adornments are drawn.

The callback function will be passed any client data that was provided when the callback was registered.

Arguments

  • func the callback function
    • panelName The name of the panel that contains the 3d view.
    • clientData User defined data passed to the callback function
  • clientData User defined data that will be passed to the callback function
  • ReturnStatus status code

Return Value

  • identifier used for removing the callback.

Status Codes

  • MS::kSuccess Operation succeeded
  • MS::kUnknownParameter The named UI object could not be found
  • MS::kInsufficientMemory No memory available
  • MS::kFailure Error adding callback

This class has no child classes.


Autodesk® Maya® 8.0 © 1997-2006 Autodesk, Inc. All rights reserved. doc++ Copyright