A reference message is sent from a target to reference makers which maintain a direct reference (either strong or weak) to it. A reference message is represented by the type RefMessage. Reference messages are sent by a reference target in response to a call to ReferenceTarget::NotifyDependents(). The message is received by an observing reference maker in the method ReferenceMaker::NotifyRefChanged(). A plug-in will override this method to process messages received from any scene objects that it observes and depends on.
Reference messages are integer constants defined in the file ref.h. A full list of reference messages can be found in the topic Reference Messages in the 3ds Max SDK reference guide.
Some of the most common reference messages follow:
User defined reference messages should be defined as a value greater than REFMSG_USER. For example.
const RefMessage MYMSG1 = REFMSG + 0; const RefMessage MYMSG2 = REFMSG + 1; // ...