This reference page is linked to from the following overview topics: Broadcast Notification System.
3ds Max supports a system where a plug-in can ask to receive a callback when certain events occur.
These are events such as the system unit settings changing,
system time setting changing, or the user executing File/Reset,
File/New, etc.
This structure is part of this system. It is available in release
2.0 and later only. The Interface class has related methods for
registering callbacks.
The plug-in creates a callback function to process the
notification. The notification callback function (NOTIFYPROC) is
defined as follows:
typedef void (* NOTIFYPROC)(void *param,
NotifyInfo *info);
The
NotifyInfo structure is passed to the NOTIFYPROC to
inform it of what it's being notified about.
The sample code below shows how this system may be used.
// Declare the callback function static void TimeUnitsChanged(void *param, NotifyInfo *info) { // Handle the units changing... } // Register the callback RegisterNotification(TimeUnitsChanged,this, NOTIFY_TIMEUNITS_CHANGE); // When done, unregister the callback UnRegisterNotification(TimeUnitsChanged,this, NOTIFY_TIMEUNITS_CHANGE);
#include <notify.h>
Public Attributes |
|
int | intcode |
void * | callParam |
This pointer is available in release 3.0 and
later only. |
void* callParam |
This pointer is available in release 3.0 and later only.
This parameter can be passed in with the function
BroadcastNotification(int code, void *callParam).