Receives and responds to messages.
A plugin which makes references must implement a method to
receive and respond to messages broadcast by its dependents. This
is done by implementing NotifyRefChanged().
The plugin developer usually implements this method as a switch
statement where each case is one of the messages the plugin needs
to respond to. The Method StdNotifyRefChanged calls this, which can
change the partID to new value. If it doesn't depend on the
particular message& partID, it should return REF_DONTCARE.
- For developer that need to update a dialog box with data about
an object you reference note the following related to this method:
This method may be called many times. For instance, say you have a
dialog box that displays data about an object you reference. This
method will get called many time during the drag operations on that
object. If you updated the display every time you'd wind up with a
lot of 'flicker' in the dialog box. Rather than updating the dialog
box each time, you should just invalidate the window in response to
the NotifyRefChanged()
call. Then, as the user drags the mouse your window will still
receive paint messages. If the scene is complex the user may have
to pause (but not let up on the mouse) to allow the paint message
to go through since they have a low priority. This is the way many
windows in 3ds Max work.
- Parameters:
-
changeInt |
- This is the interval of time over which the message is
active. Currently, all plug-ins will receive FOREVER for this
interval. |
hTarget |
- This is the handle of the reference target the message was
sent by. The reference maker uses this handle to know specifically
which reference target sent the message. |
partID |
- This contains information specific to the message passed in.
Some messages don't use the partID at all. See the section List of
Reference Messages for more information about the meaning of the
partID for some common messages. |
message |
- The message parameters passed into this method is the
specific message which needs to be handled. |
- Returns:
- The return value from this method is of type RefResult. This is
usually REF_SUCCEED indicating the message was processed.
Sometimes, the return value may be REF_STOP. This return value is
used to stop the message from being propagated to the dependents of
the item.
Implements ReferenceMaker.