3ds Max C++ API Reference
Reference Messages

************** END OF PartIDs More...

Macros

#define REFMSG_LOOPTEST   0x00000010
 This tests for a cyclic reference. It will return REF_FAIL if there is a loop. More...
 
#define REFMSG_TARGET_DELETED   0x00000020
 This message is sent when a ReferenceTarget is deleted. More...
 
#define REFMSG_MODAPP_DELETING   0x00000021
 Used Internally. More...
 
#define REFMSG_EVAL   0x00000030
 Used Internally. More...
 
#define REFMSG_RESET_ORIGIN   0x00000040
 Used Internally. More...
 
#define REFMSG_CHANGE   0x00000050
 Sent to dependents of a ReferenceTarget that has changed in some way. More...
 
#define REFMSG_FLAGDEPENDENTS   0x00000070
 Used Internally. More...
 
#define REFMSG_TARGET_SELECTIONCHANGE   0x00000080
 Used Internally. More...
 
#define REFMSG_BEGIN_EDIT   0x00000090
 This is used by modifiers to indicate when they are beginning an edit. More...
 
#define REFMSG_END_EDIT   0x000000A0
 This is used by modifiers to indicate when they are ending an edit. More...
 
#define REFMSG_DISABLE   0x000000B0
 Used Internally. More...
 
#define REFMSG_ENABLE   0x000000C0
 Used Internally. More...
 
#define REFMSG_TURNON   0x000000D0
 Used Internally. More...
 
#define REFMSG_TURNOFF   0x000000E0
 Used Internally. More...
 
#define REFMSG_LOOKAT_TARGET_DELETED   0x000000F0
 Used Internally. More...
 
#define REFMSG_INVALIDATE_IF_BG   0x000000F1
 Used Internally. More...
 
#define REFMSG_MOD_DISPLAY_ON   0x000000F2
 This is used by modifiers to indicate that their apparatus (gizmo) is displayed. More...
 
#define REFMSG_MOD_DISPLAY_OFF   0x000000F3
 This is used by modifiers to indicate that their apparatus (gizmo) is no longer displayed. More...
 
#define REFMSG_MOD_EVAL   0x000000F4
 Modifier uses this to tell Modapps to call their Eval() procedure. More...
 
#define REFMSG_IS_OK_TO_CHANGE_TOPOLOGY   0x000000F5
 Ask if it is ok to change topology.
More...
 
#define REFMSG_NODE_LINK   0x000000F6
 Sent by a node when it has a child linked to it or unlinked from it. More...
 
#define REFMSG_NODE_NAMECHANGE   0x000000F7
 Sent by a node when its name has been changed. More...
 
#define REFMSG_OBREF_CHANGE   0x000000F8
 Sent by a node (or derived object) when the object it references changes. More...
 
#define REFMSG_MODIFIER_ADDED   0x000000F9
 Sent by a derived object when a modifier is a added or deleted. More...
 
#define REFMSG_CONTROLREF_CHANGE   0x000000FA
 Sent when an animatable switches controllers for one of it's parameters. More...
 
#define REFMSG_GET_PARAM_NAME   0x000000FB
 A parameter block sends the message to it's client when it needs the anim name of the ith parameter. More...
 
#define REFMSG_GET_PARAM_DIM   0x000000FC
 A parameter block sends this message to it's client when it needs to know the dimension type of the ith parameter. More...
 
#define REFMSG_GET_CONTROL_DIM   0x000000FD
 A controller can send this to it's client to get it's param dimension. More...
 
#define REFMSG_TM_CHANGE   0x000000FE
 Sent when a Nodes transform matrix (TM) has changed in a different time. More...
 
#define REFMSG_RANGE_CHANGE   0x000000FF
 A node sends this message when it's animation range changes. More...
 
#define REFMSG_LINEHEIGHT_CHANGE   0x00000100
 Sent to the tree view when an animatable's line height changes. More...
 
#define REFMSG_BECOMING_ANIMATED   0x00000101
 A controller should send this message to the track view when it becomes animated. More...
 
#define REFMSG_SUBANIM_STRUCTURE_CHANGED   0x00000102
 Used in the TrackView to regenerate an objects sub components. More...
 
#define REFMSG_REF_DELETED   0x00000103
 A target has had a reference deleted. More...
 
#define REFMSG_REF_ADDED   0x00000104
 A target has had a reference added. More...
 
#define REFMSG_BRANCHED_HISTORY_CHANGED   0x00000105
 Sent by an object that provides branching in the history to notify that the structure of the branches changed. More...
 
#define REFMSG_NODEINSELSET_CHANGED   0x00000106
 The selection set sends this notification when it receives REFMSG_CHANGE from an item in the selection set. More...
 
#define REFMSG_TEST_DEPENDENCY   0x00000107
 This method is used to see if this reference target depends on something. More...
 
#define REFMSG_WANT_SHOWPARAMLEVEL   0x00000108
 Queries whether to display "Parameters" in the track view. More...
 
#define REFMSG_BEFORE_PASTE   0x00000109
 Sent before a paste has been done. More...
 
#define REFMSG_NOTIFY_PASTE   0x0000010A
 Sent after a paste has been done. More...
 
#define REFMSG_UV_SYM_CHANGE   0x0000010B
 Sent when a UV Generator changes symmetry, so interactive texture display updates. More...
 
#define REFMSG_GET_NODE_NAME   0x0000010C
 Gets the node's name. More...
 
#define REFMSG_SEL_NODES_DELETED   0x0000010D
 Sent by the selection set whenever it has just deleted nodes. More...
 
#define REFMSG_PRENOTIFY_PASTE   0x0000010E
 Sent before a reference target is pasted. Sent by the target about to be replaced. More...
 
#define REFMSG_SHAPE_START_CHANGE   0x0000010F
 Sent when a shape starts changing. More...
 
#define REFMSG_SHAPE_END_CHANGE   0x00000110
 Sent when a shape stops changing. More...
 
#define REFMSG_TEXMAP_REMOVED   0x00000111
 A texture map has been removed. More...
 
#define REFMSG_FLAG_NODES_WITH_SEL_DEPENDENTS   0x00000112
 Sent by an unselected node to see if any selected nodes depend on it. More...
 
#define REFMSG_CONTAINED_SHAPE_POS_CHANGE   0x00000120
 Sent by objects which contain shapes when the shape position changes. More...
 
#define REFMSG_CONTAINED_SHAPE_SEL_CHANGE   0x00000121
 Sent by objects which contain shapes when the shape position changes. More...
 
#define REFMSG_CONTAINED_SHAPE_GENERAL_CHANGE   0x00000122
 Sent by objects which contain shapes when general changes occur. More...
 
#define REFMSG_SELECT_BRANCH   0x00000130
 Select sub-object branch. More...
 
#define REFMSG_MOUSE_CYCLE_STARTED   0x00000140
 Sent when a user begins a mouse operation in the viewport. More...
 
#define REFMSG_MOUSE_CYCLE_COMPLETED   0x00000150
 Sent when a user ends a mouse operation in the viewport. More...
 
#define REFMSG_CHECK_FOR_INVALID_BIND   0x00000161
 Sent when linking nodes. More...
 
#define REFMSG_OBJECT_CACHE_DUMPED   0x00000162
 Sent when a cache is dumped in the pipeline. More...
 
#define REFMSG_SFX_CHANGE   0x00000170
 Sent by Atmospheric or Effect when it makes or deletes a reference to a node. More...
 
#define REFMSG_OBJXREF_UPDATEMAT   0x00000180
 For internal use only. More...
 
#define REFMSG_OBJXREF_UPDATECTRL   0x00000181
 For internal use only. More...
 
#define REFMSG_OBJXREF_UPDATEMAT_QUERY   0x00000182
 For internal use only. More...
 
#define REFMSG_OBJXREF_UPDATECTRL_QUERY   0x00000183
 For internal use only. More...
 
#define REFMSG_OBJECT_REPLACED   0x00000200
 Sent when objects are replaced from another scene (File->Replace). More...
 
#define REFMSG_NODE_WIRECOLOR_CHANGED   0x00000210
 Sent when nodes wireframe color is changed. More...
 
#define REFMSG_NUM_SUBOBJECTTYPES_CHANGED   0x00000211
 Indicates that the subobject types have changed and that the StackView should be updated. More...
 
#define REFMSG_GET_NODE_HANDLE   0x00000220
 Returns a unique (per session) node handle integer. More...
 
#define REFMSG_END_MODIFY_PARAMS   0x00000230
 This will cause EndEditParams to be called on the object displayed in the modify panel. More...
 
#define REFMSG_BEGIN_MODIFY_PARAMS   0x00000231
 This will cause BeginEditParams to be called on the object displayed in the modify panel. More...
 
#define REFMSG_NODE_HANDLE_CHANGED   0x00000233
 Sent to merged objects so that they can convert node handles. More...
 
#define REFMSG_NODE_WSCACHE_UPDATED   0x00000234
 The pipeline was reevaluated and the wscache was updated. More...
 
#define REFMSG_NODE_MATERIAL_CHANGED   0x00000235
 This notification is sent after a new material was assigned to a node. More...
 
#define REFMSG_SUBANIM_NUMBER_CHANGED   0x00000236
 This notification is sent to dependents when a subanim's changes order. More...
 
#define REFMSG_NODE_FLAGOMB_RENDER   0x00000237
 A Node is rendered with motion blur. More...
 
#define REFMSG_NODE_GI_PROP_CHANGED   0x00000238
 For Internal use only. More...
 
#define REFMSG_KEY_SELECTION_CHANGED   0x00000239
 Sent when key selection changes. More...
 
#define REFMSG_NODE_RENDERING_PROP_CHANGED   0x00000240
 Sent AFTER the Node Rendering Properties have changed The part id will contain information about the property that has changed. More...
 
#define REFMSG_NODE_DISPLAY_PROP_CHANGED   0x00000241
 Notification sent AFTER the Node Display Properties have changed. More...
 
#define REFMSG_NODE_LAYER_PROP_CHANGED   0x00000242
 Sent AFTER an ILayer's properties have changed Sent only to the immediate dependents of the ILayer. More...
 
#define REFMSG_MXS_CUSTATTRIB_CHANGE   0x00000250
 Message type propagated to dependents of scripted Custom Attribute (CA) when CA gets a REFMSG_CHANGE. More...
 
#define REFMSG_NODE_PRE_DELETE   0x00000255
 This message is sent immediately prior to a node being deleted. More...
 
#define REFMSG_LOCKED   0x00000260
 This message is sent after an item has been locked. More...
 
#define REFMSG_UNLOCKED   0x00000261
 This message is sent after an item has been unlocked. More...
 
#define REFMSG_OBJECT_DEFINITION_CHANGE_BEGIN   0x00000270
 This message is sent immediately before an object instance is updated to a new object definition. More...
 
#define REFMSG_OBJECT_DEFINITION_CHANGE_END   0x00000271
 This message is sent immediately after an object instance is updated to a new object definition. More...
 
#define REFMSG_DISPLAY_MATERIAL_CHANGE   0x00000275
 Notification sent when any parameters of the material or texture map changed. More...
 
#define REFMSG_GET_PARAM_NAME_NONLOCALIZED   0x00000286
 A parameter block sends the message to its client when it needs the nonlocalized anim name of the ith parameter. More...
 
#define REFMSG_GET_PARAM_NAME_LOCALIZED   0x00000287
 A parameter block sends the message to its client when it needs the localized anim name of the ith parameter. More...
 
#define REFMSG_USER   0x00010000
 Message numbers above this value can be defined for use by sub-classes, below are reserved. More...
 

Typedefs

typedef unsigned int RefMessage
 The message passed to notify and evaluate. More...
 

Defines XRef Messages

Sent to build a list of nodes which use a particular XRef object.

For Internal use only.

#define REFMSG_OBJXREF_GETNODES   0x00000190
 For internal use only. More...
 
#define REFMSG_CTRLXREF_GETNODES   0x00000191
 For internal use only. More...
 
#define REFMSG_MTLXREF_GETNODES   0x00000192
 For internal use only. More...
 

Notifications sent by ParamBlock2 and IRefTargContainer-derived classes

#define REFMSG_CONTAINER_ELEMENT_NULLED   0x00000232
 Sent when a reftarg held by ParamBlock2 or a IRefTargContainer-derived class instance is deleted.
More...
 
#define REFMSG_CONTAINER_ELEMENT_ADDED   0x00000280
 Notification sent by by IRefTargContainer-derived class instances to immediate dependents when a item slot is added. More...
 
#define REFMSG_CONTAINER_ELEMENT_REMOVED   0x00000281
 Notification sent by by IRefTargContainer-derived class instances to immediate dependents when a item slot is removed. More...
 
#define REFMSG_CONTAINER_ELEMENT_SET   0x00000282
 Notification sent by IRefTargContainer-derived class instances to immediate dependents when a item slot is set. More...
 
#define REFMSG_HISTORY_POS_CHANGED   0x00000283
 Notification sent when any position in modifier stack has changed. More...
 
#define REFMSG_NODE_USER_PROPERTY_CHANGED   0x00000284
 Notification sent when a node's user defined properties changed. More...
 
#define REFMSG_MODIFIER_NAMECHANGE   0x00000285
 Sent by a modifier when its name has been changed. More...
 

Messages sent from ReferenceMaker to ReferenceTarget

#define TARGETMSG_USER   0x00010000
 Codes used by a ReferenceMaker to send 'reverse' notification messages to a RefTarget. More...
 
#define TARGETMSG_ATTACHING_NODE   0x00000010
 Sent to a Node's Modifiers and ObjectRef when the node is attaching the object to itself. More...
 
#define TARGETMSG_DELETING_NODE   0x00000020
 Sent to a Node's Modifiers and ObjectRef when the node is about to be explicitly deleted. More...
 
#define TARGETMSG_DETACHING_NODE   0x00000030
 Sent to a Node's Modifiers and ObjectRef when the node is detaching the object from itself. More...
 
#define TARGETMSG_TRANSFORMING_NODE   0x00000040
 Sent to a Node's Modifiers and ObjectRef when the node's transform is changed. More...
 

Detailed Description

************** END OF PartIDs

This section describes some of the common messages used by references and the meaning of the PartID parameter associated with these messages. Some messages are sent by the system while others are sent by the plugin. Each method may need to pass along additional information so the reference maker may process the message. This information is passed in the PartID parameter. The meaning of the information stored in the PartID is specific to the message sent along with it.

Note
Not all messages use the PartID parameter (in fact most don't). In these cases the PartID will be set to 0. If the plugin is sending the message, it should set the PartID to 0 if not used. In the cases where the PartID is used, it is documented below.
Developers who define their own reference messages should do so using a value greater than the following:
#define REFMSG_USER 0x00010000
The system uses numbers less than this value.
See also
partid_object_channel

Macro Definition Documentation

◆ REFMSG_LOOPTEST

#define REFMSG_LOOPTEST   0x00000010

This tests for a cyclic reference. It will return REF_FAIL if there is a loop.

◆ REFMSG_TARGET_DELETED

#define REFMSG_TARGET_DELETED   0x00000020

This message is sent when a ReferenceTarget is deleted.

In response to this notification, a ReferenceMaker that makes a weak reference to the ReferenceTarget or if the target is a node (INode), must set its reference
storage (data member) to NULL. Note that the ReferenceMaker must not call ReferenceMaker::DeleteReference() or ReferenceMaker::ReplaceReference() to set its reference handle to NULL. Also, the ReferenceMaker must not delete itself in response to this notification. Instead, it should return a value of REF_AUTO_DELETE if it is to be deleted. In the event that multiple references to the ReferenceTarget being deleted are being held, the handler for this message must set just the first (in GetReference index order) reference handle to the ReferenceTarget to NULL. This message will be sent once per reference count, and the calling code performs validations that the message was handled properly. The validation assumes that the lowest reference index pointing to the ReferenceTarget being deleted is the reference that is cleared. For instance if a ReferenceMaker holds multiple references to a particular node in reference slots 4, 67 and 345, this message will be sent three times. The first call must clear reference slot 4, the second reference slot 67, and the third reference slot 345. Normally you do not need to handle this message if your ReferenceMaker holds only strong references to objects other than nodes, as the strong reference should
prevent the object from being deleted. In the event that the object is deleted anyhow (typically by an improper hard delete being performed on the object) 3ds Max will automatically delete all references to that object.

◆ REFMSG_MODAPP_DELETING

#define REFMSG_MODAPP_DELETING   0x00000021

Used Internally.

◆ REFMSG_EVAL

#define REFMSG_EVAL   0x00000030

Used Internally.

◆ REFMSG_RESET_ORIGIN

#define REFMSG_RESET_ORIGIN   0x00000040

Used Internally.

◆ REFMSG_CHANGE

#define REFMSG_CHANGE   0x00000050

Sent to dependents of a ReferenceTarget that has changed in some way.

Any time a reference target changes in a way that may affect items which reference it, this message should be sent. Note the following for the PartID that are sent during this message:

  1. PART_HIDESTATE This is a special PartID sent by visibility controllers when they change the hidden in viewport state.
  2. PART_TM This is passed in PartID when the reference is to a node in the scene and its transformation matrix has changed.
  3. PART_OBJECT_TYPE This is sent if the object type changes.

Objects and Modifier set the PartID to the channel which changed. See the section on the Geometric Pipeline for more information on channels. There are several specific PartID referring to channels. See partid_object_channel.

◆ REFMSG_FLAGDEPENDENTS

#define REFMSG_FLAGDEPENDENTS   0x00000070

Used Internally.

◆ REFMSG_TARGET_SELECTIONCHANGE

#define REFMSG_TARGET_SELECTIONCHANGE   0x00000080

Used Internally.

◆ REFMSG_BEGIN_EDIT

#define REFMSG_BEGIN_EDIT   0x00000090

This is used by modifiers to indicate when they are beginning an edit.

For example, in SimpleMod::BeginEditParams() this message is sent.

◆ REFMSG_END_EDIT

#define REFMSG_END_EDIT   0x000000A0

This is used by modifiers to indicate when they are ending an edit.

For example in SimpleMod::EndEditParams() this message is sent. Typically what a modifier will do while it is being edited it will have its LocalValidity() return NEVER so that a cache is built before it. This will ensure it is more interactive while it is being edited. When this message is sent to indicate the edit is finished the system can discard the cache.

◆ REFMSG_DISABLE

#define REFMSG_DISABLE   0x000000B0

Used Internally.

◆ REFMSG_ENABLE

#define REFMSG_ENABLE   0x000000C0

Used Internally.

◆ REFMSG_TURNON

#define REFMSG_TURNON   0x000000D0

Used Internally.

◆ REFMSG_TURNOFF

#define REFMSG_TURNOFF   0x000000E0

Used Internally.

◆ REFMSG_LOOKAT_TARGET_DELETED

#define REFMSG_LOOKAT_TARGET_DELETED   0x000000F0

Used Internally.

◆ REFMSG_INVALIDATE_IF_BG

#define REFMSG_INVALIDATE_IF_BG   0x000000F1

Used Internally.

◆ REFMSG_MOD_DISPLAY_ON

#define REFMSG_MOD_DISPLAY_ON   0x000000F2

This is used by modifiers to indicate that their apparatus (gizmo) is displayed.

For example in SimpleMod::BeginEditParams() this message is sent.

◆ REFMSG_MOD_DISPLAY_OFF

#define REFMSG_MOD_DISPLAY_OFF   0x000000F3

This is used by modifiers to indicate that their apparatus (gizmo) is no longer displayed.

◆ REFMSG_MOD_EVAL

#define REFMSG_MOD_EVAL   0x000000F4

Modifier uses this to tell Modapps to call their Eval() procedure.

This is sent by a modifier to cause its ModApp to call Eval() on the modifier. If a modifier wants its ModifyObject() method to be called it can send this message. The PartID should contain the bits that specify which channels are to be evaluated, for example PART_GEOM|PART_TOPO or ALL_CHANNELS. The interval passed should be set to Interval(t, t), where t is the time the to evaluate. Note that before NotifyDependents() returns, ModifyObject() will be called.

◆ REFMSG_IS_OK_TO_CHANGE_TOPOLOGY

#define REFMSG_IS_OK_TO_CHANGE_TOPOLOGY   0x000000F5

Ask if it is ok to change topology.

If any dependents have made topology-dependent modifications, they should return REF_FAIL:

  • A return of REF_SUCCEED means that the answer is YES, it is okay to change the topology.
  • A return of REF_FAIL means that the answer is NO, it is not okay to change the topology.

◆ REFMSG_NODE_LINK

#define REFMSG_NODE_LINK   0x000000F6

Sent by a node when it has a child linked to it or unlinked from it.

◆ REFMSG_NODE_NAMECHANGE

#define REFMSG_NODE_NAMECHANGE   0x000000F7

Sent by a node when its name has been changed.

For example, the path controller displays the name of the node in the scene which it follows. It responds to this message by changing the name displayed in the UI.

◆ REFMSG_OBREF_CHANGE

#define REFMSG_OBREF_CHANGE   0x000000F8

Sent by a node (or derived object) when the object it references changes.

Note
This message is for the most part no longer used. It is basically synonymous with REFMSG_SUBANIM_STRUCTURE_CHANGED. It is primarily used when changing the type of a light

◆ REFMSG_MODIFIER_ADDED

#define REFMSG_MODIFIER_ADDED   0x000000F9

Sent by a derived object when a modifier is a added or deleted.

◆ REFMSG_CONTROLREF_CHANGE

#define REFMSG_CONTROLREF_CHANGE   0x000000FA

Sent when an animatable switches controllers for one of it's parameters.

◆ REFMSG_GET_PARAM_NAME

#define REFMSG_GET_PARAM_NAME   0x000000FB

A parameter block sends the message to it's client when it needs the anim name of the ith parameter.


See also
REFMSG_GET_PARAM_NAME_NONLOCALIZED

◆ REFMSG_GET_PARAM_DIM

#define REFMSG_GET_PARAM_DIM   0x000000FC

A parameter block sends this message to it's client when it needs to know the dimension type of the ith parameter.

Deprecated:
Deprecated as of 3ds Max 2022, use REFMSG_GET_PARAM_NAME_LOCALIZED instead.

PartID is set to a pointer to a GetParamDim structure defined in iparamb.h

◆ REFMSG_GET_CONTROL_DIM

#define REFMSG_GET_CONTROL_DIM   0x000000FD

A controller can send this to it's client to get it's param dimension.

It should set PartID to a ParamDimension.

◆ REFMSG_TM_CHANGE

#define REFMSG_TM_CHANGE   0x000000FE

Sent when a Nodes transform matrix (TM) has changed in a different time.

This message is sent by a node when it's TM has changed because it was evaluated at a different time. Normally this isn't necessary - anyone depending on the node's TM would have a validity interval that reflected the validity of the TM. The axis system doesn't store a validity interval (it probably should) so this message is needed for it. Note that when a node is being transformed in the viewport, 3ds Max starts a hold and does a put, and then as the node is dragged the put is undone (to put the node back to where it started from) and a new put occurs with the new transform. This is done to prevent the node from walking away from the mouse cursor due to roundoff errors. This message may occur within a undo entry that is undone as the node is moved. Therefore performing scene operations in response to this message is typically not a good idea.

◆ REFMSG_RANGE_CHANGE

#define REFMSG_RANGE_CHANGE   0x000000FF

A node sends this message when it's animation range changes.

◆ REFMSG_LINEHEIGHT_CHANGE

#define REFMSG_LINEHEIGHT_CHANGE   0x00000100

Sent to the tree view when an animatable's line height changes.

◆ REFMSG_BECOMING_ANIMATED

#define REFMSG_BECOMING_ANIMATED   0x00000101

A controller should send this message to the track view when it becomes animated.

If the user has the animated only filter on then the track view will display this item.

◆ REFMSG_SUBANIM_STRUCTURE_CHANGED

#define REFMSG_SUBANIM_STRUCTURE_CHANGED   0x00000102

Used in the TrackView to regenerate an objects sub components.

This is intended mainly for the TrackView to tell it to regenerate it's view below the message sender's level. If a plugin has a variable number of parameters this message may be used.

◆ REFMSG_REF_DELETED

#define REFMSG_REF_DELETED   0x00000103

A target has had a reference deleted.

◆ REFMSG_REF_ADDED

#define REFMSG_REF_ADDED   0x00000104

A target has had a reference added.

◆ REFMSG_BRANCHED_HISTORY_CHANGED

#define REFMSG_BRANCHED_HISTORY_CHANGED   0x00000105

Sent by an object that provides branching in the history to notify that the structure of the branches changed.

◆ REFMSG_NODEINSELSET_CHANGED

#define REFMSG_NODEINSELSET_CHANGED   0x00000106

The selection set sends this notification when it receives REFMSG_CHANGE from an item in the selection set.


The selection set doesn't propagate the REFMSG_CHANGE message.

◆ REFMSG_TEST_DEPENDENCY

#define REFMSG_TEST_DEPENDENCY   0x00000107

This method is used to see if this reference target depends on something.

If the PartID is nonzero, the dependency test will include child nodes. Otherwise, child nodes will not be considered dependents. See ReferenceTarget::BeginDependencyTest().

◆ REFMSG_WANT_SHOWPARAMLEVEL

#define REFMSG_WANT_SHOWPARAMLEVEL   0x00000108

Queries whether to display "Parameters" in the track view.

A Parameter block sends this to its client to ask if it should display a distinct "Parameters" level in the track view hierarchy. A pointer to a boolean is passed in for PartID - set this to the desired answer. The default is NO – in this case the message doesn't need to be responded to.

◆ REFMSG_BEFORE_PASTE

#define REFMSG_BEFORE_PASTE   0x00000109

Sent before a paste has been done.

Sent as PartID is a pointer to a data structure containing three RefTargetHandle's: the reference maker, the old target, and the new target. The message is sent to the reference maker initially.

◆ REFMSG_NOTIFY_PASTE

#define REFMSG_NOTIFY_PASTE   0x0000010A

Sent after a paste has been done.

Sent as PartID is a pointer to a data structure containing three RefTargetHandle's: the reference maker, the old target, and the new target. The message is sent to the reference maker initially.

◆ REFMSG_UV_SYM_CHANGE

#define REFMSG_UV_SYM_CHANGE   0x0000010B

Sent when a UV Generator changes symmetry, so interactive texture display updates.

◆ REFMSG_GET_NODE_NAME

#define REFMSG_GET_NODE_NAME   0x0000010C

Gets the node's name.

The first node that gets this message will fill in the MSTR, which PartID points to, with its name and stop the message from propagating.

◆ REFMSG_SEL_NODES_DELETED

#define REFMSG_SEL_NODES_DELETED   0x0000010D

Sent by the selection set whenever it has just deleted nodes.

◆ REFMSG_PRENOTIFY_PASTE

#define REFMSG_PRENOTIFY_PASTE   0x0000010E

Sent before a reference target is pasted. Sent by the target about to be replaced.

◆ REFMSG_SHAPE_START_CHANGE

#define REFMSG_SHAPE_START_CHANGE   0x0000010F

Sent when a shape starts changing.

Sent when a shape enters a state where it'll be changing a lot and it would be a good idea for anybody using it for mesh generation to suppress updates.

◆ REFMSG_SHAPE_END_CHANGE

#define REFMSG_SHAPE_END_CHANGE   0x00000110

Sent when a shape stops changing.

◆ REFMSG_TEXMAP_REMOVED

#define REFMSG_TEXMAP_REMOVED   0x00000111

A texture map has been removed.

This tells the material editor to remove it from the viewport if it is active.

◆ REFMSG_FLAG_NODES_WITH_SEL_DEPENDENTS

#define REFMSG_FLAG_NODES_WITH_SEL_DEPENDENTS   0x00000112

Sent by an unselected node to see if any selected nodes depend on it.

The PartID param points to a boolean. If a selected node receives this message it should set the boolean to true and return REF_STOP.

◆ REFMSG_CONTAINED_SHAPE_POS_CHANGE

#define REFMSG_CONTAINED_SHAPE_POS_CHANGE   0x00000120

Sent by objects which contain shapes when the shape position changes.

◆ REFMSG_CONTAINED_SHAPE_SEL_CHANGE

#define REFMSG_CONTAINED_SHAPE_SEL_CHANGE   0x00000121

Sent by objects which contain shapes when the shape position changes.

◆ REFMSG_CONTAINED_SHAPE_GENERAL_CHANGE

#define REFMSG_CONTAINED_SHAPE_GENERAL_CHANGE   0x00000122

Sent by objects which contain shapes when general changes occur.

◆ REFMSG_SELECT_BRANCH

#define REFMSG_SELECT_BRANCH   0x00000130

Select sub-object branch.

When an object receives this message it should do what ever it needs to do (usually select the appropriate sub-object) to make the dependent object be the object returned from GetPipeBranch(). The PartID will point to an INode pointer that will be filled in by the first node to receive this message.

◆ REFMSG_MOUSE_CYCLE_STARTED

#define REFMSG_MOUSE_CYCLE_STARTED   0x00000140

Sent when a user begins a mouse operation in the viewport.

These messages are sent to dependents of the transform matrix controllers for selected objects when the user begins and ends a mouse transformation in the viewports (move/rotate/scale).

◆ REFMSG_MOUSE_CYCLE_COMPLETED

#define REFMSG_MOUSE_CYCLE_COMPLETED   0x00000150

Sent when a user ends a mouse operation in the viewport.

◆ REFMSG_CHECK_FOR_INVALID_BIND

#define REFMSG_CHECK_FOR_INVALID_BIND   0x00000161

Sent when linking nodes.

Sent by a node to other nodes (which depend on that node) when the user attempts to link another node to a node. The PartID parameter contains a pointer to the new parent node.

◆ REFMSG_OBJECT_CACHE_DUMPED

#define REFMSG_OBJECT_CACHE_DUMPED   0x00000162

Sent when a cache is dumped in the pipeline.

Sent when a cache is dumped in the pipeline. A REFMSG_CHANGE message used to be sent, however that was misleading since the object itself didn't change even though any old object pointer has become invalid. For example, if a path controller depends on a spline object and that object dumps some caches in the pipeline, the path controller hasn't actually changed. Also modifiers that reference INode to only get its transformation data should stop the propagation of this message. For example:

return REF_STOP;
break;
#define REFMSG_OBJECT_CACHE_DUMPED
Sent when a cache is dumped in the pipeline.
Definition: ref.h:501
@ REF_STOP
Return this from your implementation of ReferenceMaker::NotifyRefChanged() to stop propagating the re...
Definition: ref.h:771

◆ REFMSG_SFX_CHANGE

#define REFMSG_SFX_CHANGE   0x00000170

Sent by Atmospheric or Effect when it makes or deletes a reference to a node.

When Atmospherics or Effects add or delete a gizmo they should send this message via NotifyDependents().

◆ REFMSG_OBJXREF_UPDATEMAT

#define REFMSG_OBJXREF_UPDATEMAT   0x00000180

For internal use only.

Sent when updating object xrefs. PartID contains new material. When a node receives this message it will set its material to the new one.

◆ REFMSG_OBJXREF_UPDATECTRL

#define REFMSG_OBJXREF_UPDATECTRL   0x00000181

For internal use only.

Sent when updating object xrefs. PartID contains new controller. When a node receives this message it will set its controller to the new one.

◆ REFMSG_OBJXREF_UPDATEMAT_QUERY

#define REFMSG_OBJXREF_UPDATEMAT_QUERY   0x00000182

For internal use only.

Sent when updating object xrefs. When a node receives this message it will return REF_HALT if it will set its material to the new one when handling REFMSG_OBJXREF_UPDATEMAT.

◆ REFMSG_OBJXREF_UPDATECTRL_QUERY

#define REFMSG_OBJXREF_UPDATECTRL_QUERY   0x00000183

For internal use only.

Sent when updating object xrefs. When a node receives this message it will return REF_HALT if it will set its controller to the new one when handling REFMSG_OBJXREF_UPDATECTRL.

◆ REFMSG_OBJXREF_GETNODES

#define REFMSG_OBJXREF_GETNODES   0x00000190

For internal use only.

PartID points to a table of base node pointers.

◆ REFMSG_CTRLXREF_GETNODES

#define REFMSG_CTRLXREF_GETNODES   0x00000191

For internal use only.

PartID points to a table of base node pointers.

◆ REFMSG_MTLXREF_GETNODES

#define REFMSG_MTLXREF_GETNODES   0x00000192

For internal use only.

PartID points to a table of base node pointers.

◆ REFMSG_OBJECT_REPLACED

#define REFMSG_OBJECT_REPLACED   0x00000200

Sent when objects are replaced from another scene (File->Replace).

Other objects referencing the object that is replaced may want to perform some validity checking; this message is more specific than REFMSG_SUBANIM_STRUCTURE_CHANGED.

◆ REFMSG_NODE_WIRECOLOR_CHANGED

#define REFMSG_NODE_WIRECOLOR_CHANGED   0x00000210

Sent when nodes wireframe color is changed.

◆ REFMSG_NUM_SUBOBJECTTYPES_CHANGED

#define REFMSG_NUM_SUBOBJECTTYPES_CHANGED   0x00000211

Indicates that the subobject types have changed and that the StackView should be updated.

◆ REFMSG_GET_NODE_HANDLE

#define REFMSG_GET_NODE_HANDLE   0x00000220

Returns a unique (per session) node handle integer.

The partID contains a pointer to a ULONG. The first node that gets this message will assign its node handle to this ULONG, and will return REF_STOP to terminate further propagation of the message.

◆ REFMSG_END_MODIFY_PARAMS

#define REFMSG_END_MODIFY_PARAMS   0x00000230

This will cause EndEditParams to be called on the object displayed in the modify panel.

◆ REFMSG_BEGIN_MODIFY_PARAMS

#define REFMSG_BEGIN_MODIFY_PARAMS   0x00000231

This will cause BeginEditParams to be called on the object displayed in the modify panel.

◆ REFMSG_NODE_HANDLE_CHANGED

#define REFMSG_NODE_HANDLE_CHANGED   0x00000233

Sent to merged objects so that they can convert node handles.

After merging nodes into the scene, all merged objects will receive this reference notification. The PartID will be a pointer to a merge manager interface that you can use to see if a specific handle was converted and convert between the old and
the new handle.

IMergeManager* pMergeManager = (IMergeManager*)partID;
Definition: ioapi.h:154

Node handles can change when a scene is merged and if you keep track of nodes using their handles you need to intercept this message. The PartID will be a pointer to an IMergeManager object that you can use to map between the old and new handle.

◆ REFMSG_NODE_WSCACHE_UPDATED

#define REFMSG_NODE_WSCACHE_UPDATED   0x00000234

The pipeline was reevaluated and the wscache was updated.

Sent from the node (without propagation) whenever the world state cache gets updated (e.g. when the pipeline gets reevaluated).

◆ REFMSG_NODE_MATERIAL_CHANGED

#define REFMSG_NODE_MATERIAL_CHANGED   0x00000235

This notification is sent after a new material was assigned to a node.

◆ REFMSG_SUBANIM_NUMBER_CHANGED

#define REFMSG_SUBANIM_NUMBER_CHANGED   0x00000236

This notification is sent to dependents when a subanim's changes order.

It is used by things like scripted plugin's and custom attributes to tell expression and wire controllers when the user redefines the ordering of parameters so these controllers can keep pointing at the correct parameter.
The PartID is a Tab<DWORD>* in which each DWORD contains an old-to-new mapping with the LOWORD() = old subanim number and the HIWORD() = new subanim number. A new subanim ID of -1 implies the subanim was removed.
See maxsdk/samples/control/exprctrl.cpp for example use. NOTE: If you send this message, the 'propagate' argument of NotifyDependents must be false. Otherwise, dependents of dependents think that their ref's subAnim numbering is changing.

◆ REFMSG_NODE_FLAGOMB_RENDER

#define REFMSG_NODE_FLAGOMB_RENDER   0x00000237

A Node is rendered with motion blur.

◆ REFMSG_NODE_GI_PROP_CHANGED

#define REFMSG_NODE_GI_PROP_CHANGED   0x00000238

For Internal use only.

Notification sent AFTER the Global Illumination (radiosity) properties of a node changed.

The PartId will contain information about the property that has changed.

◆ REFMSG_KEY_SELECTION_CHANGED

#define REFMSG_KEY_SELECTION_CHANGED   0x00000239

Sent when key selection changes.

◆ REFMSG_NODE_RENDERING_PROP_CHANGED

#define REFMSG_NODE_RENDERING_PROP_CHANGED   0x00000240

Sent AFTER the Node Rendering Properties have changed The part id will contain information about the property that has changed.

See also
partid_change_render_properties

◆ REFMSG_NODE_DISPLAY_PROP_CHANGED

#define REFMSG_NODE_DISPLAY_PROP_CHANGED   0x00000241

Notification sent AFTER the Node Display Properties have changed.

The part id will contain information about the property that has changed.

◆ REFMSG_NODE_LAYER_PROP_CHANGED

#define REFMSG_NODE_LAYER_PROP_CHANGED   0x00000242

Sent AFTER an ILayer's properties have changed Sent only to the immediate dependents of the ILayer.

◆ REFMSG_MXS_CUSTATTRIB_CHANGE

#define REFMSG_MXS_CUSTATTRIB_CHANGE   0x00000250

Message type propagated to dependents of scripted Custom Attribute (CA) when CA gets a REFMSG_CHANGE.

Scripted custom attributes sit on an object, but do not directly affect the output of that object. If a REFMSG_CHANGE message is propagated to the dependents of the CA, the REFMSG_CHANGE message will be propagated to the dependents of the object, and those dependents will think that the object has changed. This can result in caches being thrown away needlessly. In r8 and r9.0, when a scripted CA received a REFMSG_CHANGE, a REF_STOP result was returned stopping propagation to dependents. This affected things like the trackbar, where moving keys on the CA wasn't causing the trackbar to update. In r9.1, a REFMSG_CHANGE notification to the scripted custom attribute causes a REFMSG_MXS_CUSTATTRIB_CHANGE notification to be sent to the dependents of the CA.

◆ REFMSG_NODE_PRE_DELETE

#define REFMSG_NODE_PRE_DELETE   0x00000255

This message is sent immediately prior to a node being deleted.

This allows the reference maker to handle this condition if it depends on the deleted node. At the time this message is sent, the node's children have not been detached nor has the node been disconnected from its parent. This message is sent to only the immediate dependents of the node. This message is sent immediately after the NOTIFY_SCENE_PRE_DELETED_NODE Broadcast Notification

◆ REFMSG_LOCKED

#define REFMSG_LOCKED   0x00000260

This message is sent after an item has been locked.

See also
ILockedTracksMan

◆ REFMSG_UNLOCKED

#define REFMSG_UNLOCKED   0x00000261

This message is sent after an item has been unlocked.

See also
ILockedTracksMan

◆ REFMSG_OBJECT_DEFINITION_CHANGE_BEGIN

#define REFMSG_OBJECT_DEFINITION_CHANGE_BEGIN   0x00000270

This message is sent immediately before an object instance is updated to a new object definition.

MAXScript allows scripted plugin and scripted custom attribute definitions to be updated by re-evaluating the definition script. The new definition can add or remove local variables, parameter blocks, parameter block items, rollouts, and rollout controls. After the new definition is evaluated, existing plugin instances are converted to this new definition. This message is sent to the dependents of a scripted plugin instance immediately before the instance is converted to the new definition. The partID passed is a ReferenceTarget pointer to the plugin instance. A dependent may use this notification to, for example, rebuild the rollout display for the instance.

See also
NOTIFY_OBJECT_DEFINITION_CHANGE_BEGIN

◆ REFMSG_OBJECT_DEFINITION_CHANGE_END

#define REFMSG_OBJECT_DEFINITION_CHANGE_END   0x00000271

This message is sent immediately after an object instance is updated to a new object definition.

MAXScript allows scripted plugin and scripted custom attribute definitions to be updated by re-evaluating the definition script. The new definition can add or remove local variables, parameter blocks, parameter block items, rollouts, and rollout controls. After the new definition is evaluated, existing plugin instances are converted to this new definition. This message is sent to the dependents of a scripted plugin instance immediately after the instance is converted to the new definition. The partID passed is a ReferenceTarget pointer to the plugin instance. A dependent may use this notification to, for example, rebuild the rollout display for the instance.

See also
NOTIFY_OBJECT_DEFINITION_CHANGE_END

◆ REFMSG_DISPLAY_MATERIAL_CHANGE

#define REFMSG_DISPLAY_MATERIAL_CHANGE   0x00000275

Notification sent when any parameters of the material or texture map changed.

This message is used by viewport material notifier only. Nitrous material notification system ignores validity of a material. It updates material only when receiving this notification.

◆ REFMSG_CONTAINER_ELEMENT_NULLED

#define REFMSG_CONTAINER_ELEMENT_NULLED   0x00000232

Sent when a reftarg held by ParamBlock2 or a IRefTargContainer-derived class instance is deleted.

Sent by ParamBlock2 and IRefTargContainer-derived class instances to its owner whenever a reftarg
parameter is forcibly deleted and the reference set to NULL (typically for INODE_TABs when a scene node is deleted in the viewport). For ParamBlock2 instances, you can use IParamBlock2::LastNotifyParamID(int& tabIndex) to determine which parameter/element was NULLed. For IRefTargContainer-derived instances, IRefTargContainer::GetChangedRefTargetIndex() can be used.

◆ REFMSG_CONTAINER_ELEMENT_ADDED

#define REFMSG_CONTAINER_ELEMENT_ADDED   0x00000280

Notification sent by by IRefTargContainer-derived class instances to immediate dependents when a item slot is added.

See also
IRefTargContainer, IIndirectRefTargContainer

◆ REFMSG_CONTAINER_ELEMENT_REMOVED

#define REFMSG_CONTAINER_ELEMENT_REMOVED   0x00000281

Notification sent by by IRefTargContainer-derived class instances to immediate dependents when a item slot is removed.

See also
IRefTargContainer, IIndirectRefTargContainer

◆ REFMSG_CONTAINER_ELEMENT_SET

#define REFMSG_CONTAINER_ELEMENT_SET   0x00000282

Notification sent by IRefTargContainer-derived class instances to immediate dependents when a item slot is set.

See also
IRefTargContainer, IIndirectRefTargContainer

◆ REFMSG_HISTORY_POS_CHANGED

#define REFMSG_HISTORY_POS_CHANGED   0x00000283

Notification sent when any position in modifier stack has changed.

◆ REFMSG_NODE_USER_PROPERTY_CHANGED

#define REFMSG_NODE_USER_PROPERTY_CHANGED   0x00000284

Notification sent when a node's user defined properties changed.

This message is sent when either GBufId or User-defined attributes of a node changed.

◆ REFMSG_MODIFIER_NAMECHANGE

#define REFMSG_MODIFIER_NAMECHANGE   0x00000285

Sent by a modifier when its name has been changed.

The Modify Panel responds to this message by changing the name displayed in the UI and potentially in the modifier selection dropdown. The modifier pointer is sent as partid. For example NotifyDependents(FOREVER, (INT_PTR)modifier, REFMSG_MODIFIER_NAMECHANGE);

◆ REFMSG_GET_PARAM_NAME_NONLOCALIZED

#define REFMSG_GET_PARAM_NAME_NONLOCALIZED   0x00000286

A parameter block sends the message to its client when it needs the nonlocalized anim name of the ith parameter.

See also
REFMSG_GET_PARAM_NAME_LOCALIZED

◆ REFMSG_GET_PARAM_NAME_LOCALIZED

#define REFMSG_GET_PARAM_NAME_LOCALIZED   0x00000287

A parameter block sends the message to its client when it needs the localized anim name of the ith parameter.

See also
REFMSG_GET_PARAM_NAME_NONLOCALIZED

◆ REFMSG_USER

#define REFMSG_USER   0x00010000

Message numbers above this value can be defined for use by sub-classes, below are reserved.

◆ TARGETMSG_USER

#define TARGETMSG_USER   0x00010000

Codes used by a ReferenceMaker to send 'reverse' notification messages to a RefTarget.

Developers who define their own reference target messages should do so using a value greater than:

#define TARGETMSG_USER 0x00010000.

Target notify message IDs above this value can be used by other plugins

Best if large random IDs

◆ TARGETMSG_ATTACHING_NODE

#define TARGETMSG_ATTACHING_NODE   0x00000010

Sent to a Node's Modifiers and ObjectRef when the node is attaching the object to itself.

◆ TARGETMSG_DELETING_NODE

#define TARGETMSG_DELETING_NODE   0x00000020

Sent to a Node's Modifiers and ObjectRef when the node is about to be explicitly deleted.

◆ TARGETMSG_DETACHING_NODE

#define TARGETMSG_DETACHING_NODE   0x00000030

Sent to a Node's Modifiers and ObjectRef when the node is detaching the object from itself.

◆ TARGETMSG_TRANSFORMING_NODE

#define TARGETMSG_TRANSFORMING_NODE   0x00000040

Sent to a Node's Modifiers and ObjectRef when the node's transform is changed.

Typedef Documentation

◆ RefMessage

typedef unsigned int RefMessage

The message passed to notify and evaluate.