ref.h File Reference

#include "BuildWarnings.h"
#include "maxheap.h"
#include "strbasic.h"
#include "noncopyable.h"
#include "autoptr.h"
#include <WTypes.h>
#include "CoreExport.h"
#include "Animatable.h"
#include "AnimatableFlags.h"
#include "hold.h"
#include "channels.h"

Classes

class  RemapDir
 For remapping references during a Clone. More...
 
class  PostPatchProc
 
class  DependentEnumProc
 A callback class for enumerating dependents. More...
 
class  SaveEnumProc
 A callback class for saving dependents. More...
 
class  DefaultRemapDir
 Implements a default version of a RemapDir. More...
 
class  ReferenceMaker
 A scene entity that owns other scene entities and listens to messages from them. More...
 
class  ReferenceTarget
 A scene entity that is being owned and listened to by other scene entities. More...
 
class  DependentIterator
 Iterates through all direct dependents of a given ReferenceTarget. More...
 
class  DeletedRestore
 
class  RefEnumProc
 A callback class for ReferenceMaker::EnumRefHierarchy. More...
 
class  GlobalReferenceMaker
 This class lets you tap in to ALL reference messages in the entire system. More...
 
class  GlobalReferenceMaker::GlobalReferenceDisableGuard
 This class is used to temporarily disable global reference makers. More...
 
class  SingleRefMaker
 Reference Maker to single entity. More...
 
class  AnimateSuspend
 Suspends the "animate" mode in an exception safe manner. More...
 
class  SuspendAll
 Suspends various system states in an exception safe manner. More...
 

Namespaces

 MaxSDK
 These classes let you define skin weighting using a voxel or height map based algorithm.
 

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 it's 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_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_USER   0x00010000
 Message numbers above this value can be defined for use by sub-classes, below are reserved. More...
 
#define VALID(x)   (x)
 
#define NOTIFY_ALL   0xfffffff0
 If this super class is passed to NotifyDependents() all dependents will be notified. More...
 
#define REFERENCE_MAKER_INTERFACE   0x2f96f73
 A ULONG Interface Id to determine if an Animatable is a Reference Maker or Target. More...
 
#define REFERENCE_TARGET_INTERFACE   0x66b073ea
 A ULONG Interface Id to determine if an Animatable is a Reference Maker or Target. More...
 
Defines XRef Messages

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

#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...
 
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...
 
Defines enumeration return values

Possible return values for RefEnumProc::proc()

#define DEP_ENUM_CONTINUE   0
 Continues enumeration. More...
 
#define DEP_ENUM_HALT   1
 Halts enumeration. More...
 
#define DEP_ENUM_SKIP   2
 Skip enumeration. More...
 
#define REF_ENUM_CONTINUE   0
 Continues enumeration. More...
 
#define REF_ENUM_HALT   1
 Halts enumeration. More...
 
#define REF_ENUM_SKIP   2
 Skip enumeration. More...
 

Typedefs

typedef voidReferenceData
 
typedef unsigned int TargetParam
 
typedef ULONG_PTR PartID
 This is NOT just a bitmask, the parameter is also used to stuff pointers, hence the ULONG_PTR. More...
 
typedef unsigned int RefMessage
 The message passed to notify and evaluate. More...
 
typedef ReferenceTargetRefTargetHandle
 Creates a typename for ReferenceTarget pointers. More...
 
typedef ReferenceMakerRefMakerHandle
 Creates a typename for ReferenceMaker pointers. More...
 

Enumerations

enum  RefResult {
  REF_FAIL = 0, REF_HALT = 0, REF_SUCCEED, REF_DONTCARE,
  REF_STOP, REF_INVALID, REF_AUTO_DELETE
}
 Return codes for reference handling and message processing methods. More...
 
enum  NotifyDependentsOption {
  REFNOTIFY_ALLOW_OPTIMIZATIONS = 0, REFNOTIFY_DISALLOW_OPTIMIZATIONS, REFNOTIFY_INTERNAL_PROPAGATION_ALLOW_OPTIMIZATIONS, REFNOTIFY_INTERNAL_PROPAGATION_ALLOW_OPTIMIZATIONS_ENABLED,
  REFNOTIFY_INTERNAL_PROPAGATION_DISALLOW_OPTIMIZATIONS
}
 Specified as argument to NotifyDependents to specify level of optimizations used. More...
 

Functions

CoreExport bool CanOptimizeDependentNotifications (NotifyDependentsOption notifyDependentsOption, RefMessage message, NotifyDependentsOption &propagated_notifyDependentsOption)
 Returns true if this RefMessage can have redundant notifications optimized (inhibited). More...
 
CoreExport RemapDirNewRemapDir (BOOL use_A_WORK2_flag=FALSE)
 Gets a pointer to a default version of a RemapDir. More...
 
CoreExport ReferenceTargetCloneRefHierarchy (ReferenceTarget *rm)
 This function is used to clone a single ReferenceTarget. More...
 
CoreExport void RegisterGlobalReference (GlobalReferenceMaker *maker)
 Registers an instance of this class whose NotifyRefChanged() method will receive the messages. More...
 
CoreExport void UnRegisterGlobalReference (GlobalReferenceMaker *maker)
 Unregisters the class so it won't be called anymore. More...
 
CoreExport void ClearAFlagInHierarchy (RefMakerHandle rm, DWORD mask)
 Clears the specified Animatable Flag bits in a reference hierarchy. More...
 
CoreExport void ClearAFlagInAllAnimatables (DWORD mask)
 Clears the specified Animatable Flag bits on all Animatables. More...
 
CoreExport BOOL DependsOn (RefMakerHandle mkr, RefMakerHandle targ)
 Checks if there is a path of references from a ReferenceMaker to a ReferenceTarget. More...
 
CoreExport DWORD GetSavingVersion ()
 Function to find out if we are saving an old version of a .MAX file. More...
 
CoreExport DWORD SetSavingVersion (DWORD version)
 Function used internally to maintain the SavingVersion number, which should not be called by plugins. More...
 
CoreExport void DisableRefMsgs ()
 Disable reference messages globally. More...
 
CoreExport void EnableRefMsgs ()
 Enable reference messages globally. More...
 

Variables

Object Channel PartIDs

OBJECT STATE: SUB-PARTS These are the 4 sub-channels in the object state. Don't change these defines.

See also
channels.h for define of TOPO_CHANNEL, etc.
const PartID PART_TOPO = (PartID)TOPO_CHANNEL
 See TOPO_CHANNEL. More...
 
const PartID PART_GEOM = (PartID)GEOM_CHANNEL
 See GEOM_CHANNEL. More...
 
const PartID PART_TEXMAP = (PartID)TEXMAP_CHANNEL
 See TEXMAP_CHANNEL. More...
 
const PartID PART_MTL = (PartID)MTL_CHANNEL
 See MTL_CHANNEL. More...
 
const PartID PART_SELECT = (PartID)SELECT_CHANNEL
 See SELECT_CHANNEL. More...
 
const PartID PART_SUBSEL_TYPE = (PartID)SUBSEL_TYPE_CHANNEL
 See SUBSEL_TYPE_CHANNEL. More...
 
const PartID PART_DISPLAY = (PartID)DISP_ATTRIB_CHANNEL
 See DISP_ATTRIB_CHANNEL. More...
 
const PartID PART_VERTCOLOR = (PartID)VERTCOLOR_CHANNEL
 See VERTCOLOR_CHANNEL. More...
 
const PartID PART_GFX_DATA = (PartID)GFX_DATA_CHANNEL
 See GFX_DATA_CHANNEL. More...
 
const PartID PART_DISP_APPROX = (PartID)DISP_APPROX_CHANNEL
 See DISP_APPROX_CHANNEL. More...
 
const PartID PART_EXTENSION = (PartID)EXTENSION_CHANNEL
 See EXTENSION_CHANNEL. More...
 
const PartID PART_TM_CHAN = (PartID)TM_CHANNEL
 Transform Channel. More...
 
const PartID PART_MTL_CHAN = (PartID)GLOBMTL_CHANNEL
 Material Channel. More...
 
const PartID PART_OBJECT_TYPE = (PartID)(1<<11)
 The type of object in the pipeline changed. More...
 
const PartID PART_TM = (PartID)(1<<12)
 node transform matrix More...
 
const PartID PART_OBJ = (PartID)(PART_TOPO|PART_GEOM)
 Combination of PART_TOPO and PART_GEOM. More...
 
const PartID PART_ALL = (PartID)(ALL_CHANNELS|PART_TM)
 Combination of ALL_CHANNELS and PART_TM. More...
 
Node Global Illumination Property PartIDs

Part IDs sent with the \ref REFMSG_NODE_GI_PROP_CHANGED message.   
const PartID PART_GI_EXCLUDED = (PartID)(1<<0)
 Excluded. More...
 
const PartID PART_GI_OCCLUDER = (PartID)(1<<1)
 Excluder. More...
 
const PartID PART_GI_RECEIVER = (PartID)(1<<2)
 Receiver. More...
 
const PartID PART_GI_DIFFUSE = (PartID)(1<<3)
 Diffuse. More...
 
const PartID PART_GI_SPECULAR = (PartID)(1<<4)
 Specular. More...
 
const PartID PART_GI_NBREFINESTEPS = (PartID)(1<<5)
 Refine Steps. More...
 
const PartID PART_GI_MESHSIZE = (PartID)(1<<6)
 Mesh Size. More...
 
const PartID PART_GI_MESHINGENABLED = (PartID)(1<<7)
 Meshing Enabled. More...
 
const PartID PART_GI_USEGLOBALMESHING = (PartID)(1<<8)
 Use Global Meshing. More...
 
const PartID PART_GI_EXCLUDEFROMREGATHERING = (PartID)(1<<9)
 Exclude From Regathering. More...
 
const PartID PART_GI_STOREILLUMMESH = (PartID)(1<<10)
 Store Illumination Mesh. More...
 
const PartID PART_GI_RAYMULT = (PartID)(1<<11)
 Ray Multiplier. More...
 
const PartID PART_GI_USE_ADAPTIVE_SUBDIVISION = (PartID)(1<<12)
 Use Adaptive Subdivision. More...
 
const PartID PART_GI_MIN_MESH_SIZE = (PartID)(1<<13)
 Minium Mesh size. More...
 
const PartID PART_GI_INITIAL_MESH_SIZE = (PartID)(1<<14)
 Initial Mesh size. More...
 
const PartID PART_GI_CONTRAST_THRESHOLD = (PartID)(1<<15)
 Contrast Threshold. More...
 
Node Render Property PartIDs
const PartID PART_REND_PROP_RENDERABLE = (PartID)(1<<0)
 Renderable. More...
 
const PartID PART_REND_PROP_CAST_SHADOW = (PartID)(1<<1)
 Cast Shadow. More...
 
const PartID PART_REND_PROP_RCV_SHADOW = (PartID)(1<<2)
 Recieve Shadow. More...
 
const PartID PART_REND_PROP_RENDER_OCCLUDED = (PartID)(1<<3)
 Render Occluded. More...
 
const PartID PART_REND_PROP_VISIBILITY = (PartID)(1<<4)
 Visibility. More...
 
const PartID PART_REND_PROP_INHERIT_VIS = (PartID)(1<<5)
 Inherit Visibility. More...
 
const PartID PART_REND_PROP_PRIMARY_INVISIBILITY = (PartID)(1<<6)
 Primary Visibility. More...
 
const PartID PART_REND_PROP_SECONDARY_INVISIBILITY = (PartID)(1<<7)
 Secondary Visibility. More...
 
PartIDs for Changing Display Properties

PartIDs sent with the REFMSG_NODE_DISPLAY_PROP_CHANGED message.

const PartID PART_DISP_PROP_IS_HIDDEN = (PartID)(1<<0)
 Is hidden. More...
 
const PartID PART_DISP_PROP_IS_FROZEN = (PartID)(1<<1)
 Is frozen. More...
 
const PartID PART_DISP_PROP_SHOW_FRZN_WITH_MTL = (PartID)(1<<2)
 Show frozen with material. More...
 
const PartID PART_DISP_PROP_BOX_MODE = (PartID)(1<<3)
 Box mode. More...
 
const PartID PART_DISP_PROP_BACKCULL = (PartID)(1<<4)
 Backface culling. More...
 
const PartID PART_DISP_PROP_ALL_EDGES = (PartID)(1<<5)
 All edges. More...
 
const PartID PART_DISP_PROP_BONE_ONLY = (PartID)(1<<6)
 Bones only. More...
 
const PartID PART_DISP_PROP_BONE_AS_LINE = (PartID)(1<<7)
 Bones as lines. More...
 
const PartID PART_DISP_PROP_SHOW_PATH = (PartID)(1<<8)
 Show path. More...
 
const PartID PART_DISP_PROP_VERT_TICKS = (PartID)(1<<9)
 Vertex ticks. More...
 
const PartID PART_DISP_PROP_XRAY_MTL = (PartID)(1<<10)
 XRay material. More...
 
const PartID PART_DISP_PROP_IGNORE_EXTENTS = (PartID)(1<<11)
 Ignore extents. More...
 
const PartID PART_DISP_PROP_COLOR_VERTS = (PartID)(1<<12)
 Vertex colors. More...
 
Miscellaneous PartIDs

const PartID PART_EXCLUDE_RADIOSITY = (PartID)(1<<29)
 Special part ID that prevents the radiosity engine from processing the change. More...
 
const PartID PART_HIDESTATE = (PartID)(1<<30)
 Special part ID sent by visibility controllers. More...
 
const PartID PART_MXS_PROPCHANGE = (PartID)(1<<16)
 Special part ID sent by MAXScript when it changes an object's parameter. More...
 
PartIDs when notify dependents is called with REFMSG_FLAGDEPENDENTS
const PartID PART_PUT_IN_FG = (PartID)(1<<0)
 Put in Foreground. More...
 
const PartID PART_SHOW_DEPENDENCIES = (PartID)(1<<1)
 Show dependencies. More...
 
const PartID PART_SHOWDEP_ON = (PartID)(1<<2)
 Show dependencies on. More...
 

Macro Definition Documentation

#define VALID (   x)    (x)
#define NOTIFY_ALL   0xfffffff0

If this super class is passed to NotifyDependents() all dependents will be notified.

#define DEP_ENUM_CONTINUE   0

Continues enumeration.

#define DEP_ENUM_HALT   1

Halts enumeration.

#define DEP_ENUM_SKIP   2

Skip enumeration.

#define REFERENCE_MAKER_INTERFACE   0x2f96f73

A ULONG Interface Id to determine if an Animatable is a Reference Maker or Target.

#define REFERENCE_TARGET_INTERFACE   0x66b073ea

A ULONG Interface Id to determine if an Animatable is a Reference Maker or Target.

#define REF_ENUM_CONTINUE   0

Continues enumeration.

#define REF_ENUM_HALT   1

Halts enumeration.

#define REF_ENUM_SKIP   2

Skip enumeration.

Typedef Documentation

typedef void* ReferenceData
typedef unsigned int TargetParam

Creates a typename for ReferenceTarget pointers.

Creates a typename for ReferenceMaker pointers.

Enumeration Type Documentation

enum RefResult

Return codes for reference handling and message processing methods.

Enumerator
REF_FAIL 

The operation failed.

REF_HALT 

Return this from your implementation of ReferenceMaker::NotifyRefChanged() in order to immediately stop sending the reference message to dependents of the RefereneTarget the message originates from.

REF_SUCCEED 

The operation succeeded.

REF_DONTCARE 

The results of the operation don't matter.

REF_STOP 

Return this from your implementation of ReferenceMaker::NotifyRefChanged() to stop propagating the reference message to your dependents, but allow it to be sent to the other dependents of the ReferenceTarget the message originates from.

REF_INVALID 

Attempts to delete an invalid reference will return this value.

REF_AUTO_DELETE 

Return this from your implementation of ReferenceMaker::NotifyRefChanged() in response to a REFMGS_TAGET_DELETED message to indicate that all the reference targets you depended on have been deleted, and you also wish to be deleted from the scene.

717  {
719  REF_FAIL = 0,
723  REF_HALT = 0,
725  REF_SUCCEED,
727  REF_DONTCARE,
731  REF_STOP,
733  REF_INVALID,
739 };
The operation failed.
Definition: ref.h:719
Return this from your implementation of ReferenceMaker::NotifyRefChanged() in response to a REFMGS_TA...
Definition: ref.h:738
Attempts to delete an invalid reference will return this value.
Definition: ref.h:733
Return this from your implementation of ReferenceMaker::NotifyRefChanged() in order to immediately st...
Definition: ref.h:723
The results of the operation don't matter.
Definition: ref.h:727
Return this from your implementation of ReferenceMaker::NotifyRefChanged() to stop propagating the re...
Definition: ref.h:731
The operation succeeded.
Definition: ref.h:725

Specified as argument to NotifyDependents to specify level of optimizations used.

Enumerator
REFNOTIFY_ALLOW_OPTIMIZATIONS 

Duplicate messages (same hTarg, message, and partID) to same refmaker are blocked.

Not all message types are blocked, some are always allowed as duplicates to allow proper operation of 3dsmax Note that this option can be turned off entirely by the user in the .ini by setting EnableOptimizeDependentNotifications=0

REFNOTIFY_DISALLOW_OPTIMIZATIONS 

Duplicate messages are not blocked.

REFNOTIFY_INTERNAL_PROPAGATION_ALLOW_OPTIMIZATIONS 

Used internally when propagating notifications.

REFNOTIFY_INTERNAL_PROPAGATION_ALLOW_OPTIMIZATIONS_ENABLED 
REFNOTIFY_INTERNAL_PROPAGATION_DISALLOW_OPTIMIZATIONS 
742  {
751  //
752  // Optimizations permitted but not active; typically message is not optimizable (but may be
753  // changed to an optimizable message further down the dependency chain)
755  // Optimizations permitted and currently active
757  // Optimizations not permitted
759 };
Duplicate messages (same hTarg, message, and partID) to same refmaker are blocked.
Definition: ref.h:747
Used internally when propagating notifications.
Definition: ref.h:754
Duplicate messages are not blocked.
Definition: ref.h:749

Function Documentation

CoreExport bool CanOptimizeDependentNotifications ( NotifyDependentsOption  notifyDependentsOption,
RefMessage  message,
NotifyDependentsOption propagated_notifyDependentsOption 
)

Returns true if this RefMessage can have redundant notifications optimized (inhibited).

Parameters
notifyDependentsOption- Specifies the level of optimization currently in use.
message- Type of notification message that may be sent.
propagated_notifyDependentsOption- Returns the level of optimization dependents should request.
Returns
true if the message can be optimized; false if it cannot.
CoreExport RemapDir* NewRemapDir ( BOOL  use_A_WORK2_flag = FALSE)

Gets a pointer to a default version of a RemapDir.

See also
CloneRefHierarchy(), ReferenceTarget::Clone() You must delete the RemapDir returned by this function when done using it via the DeleteThis method. When the boolean use_A_WORK2_flag is set to TRUE, the remap directory will set this flag on all entries in the remap directory, and will assume that any object that DOESN'T have this flag set is not in the remap directory. This avoids the search through the directory and speeds up things greatly. When using this feature, you must first clear A_WORK2 on all of the objects being cloned. DS: 3/17/00. When the instance is deleted, the Backpatch() method is automatically called if backpatch operations were added but never performed.
Precondition
First clear the A_WORK2 flag on all objects being cloned.
Postcondition
Flag is set on all entries in remap directory.
Parameters
use_A_WORK2_flag- used to set this flag on all entries in the remap directory.
CoreExport ReferenceTarget* CloneRefHierarchy ( ReferenceTarget rm)

This function is used to clone a single ReferenceTarget.

See also
Class RemapDir, ReferenceTarget::Clone() Implemented by system. This function should be used by plug-ins to clone a single ReferenceTarget instead of ReferenceTarget::Clone(RemapDir*) Calling ReferenceTarget::Clone() does not add the old/new ReferenceTargets to the RemapDir passed to Clone, and any backpointers in the reference hierarchy under the original ReferenceTarget that points back to that ReferenceTarget will fail to backpatch correctly. This function takes care of setting up the RemapDir, calling Clone, adding the old/new ReferenceTargets to the RemapDir, and having the RemapDir perform backpatching. So instead of:
1 ReplaceReference(IPBLOCK,ipblock->Clone(DefaultRemapDir()));

you should say:

1 ReplaceReference(IPBLOCK,CloneRefHierarchy(ipblock));

If you are cloning multiple ReferenceTargets, you should be creating a RemapDir and cloning the ReferenceTargets using RemapDir::CloneRef. Otherwise, any common ReferenceTarget under the ReferenceTargets being cloned would be cloned as separate ReferenceTargets, rather than a single ReferenceTarget that is shared. So, for example:

1 RemapDir *remap = NewRemapDir();
2 ReplaceReference(ES_MASTER_CONTROL_REF, remap->CloneRef(from.masterCont));
3 ReplaceReference(ES_SLAVE_CONTROL_REF, remap->CloneRef(from.slaveCont));
4 remap->Backpatch();
5 remap->DeleteThis();
Parameters
rm- A pointer to the reference target to clone.
Returns
A pointer to the new reference target
CoreExport void RegisterGlobalReference ( GlobalReferenceMaker maker)

Registers an instance of this class whose NotifyRefChanged() method will receive the messages.

Parameters
maker- Points to an instance of this class whose NotifyRefChanged() method will receive the messages
CoreExport void UnRegisterGlobalReference ( GlobalReferenceMaker maker)

Unregisters the class so it won't be called anymore.

Parameters
maker- Points to an instance of this class whose NotifyRefChanged() method will no longer receive the messages
CoreExport void ClearAFlagInHierarchy ( RefMakerHandle  rm,
DWORD  mask 
)

Clears the specified Animatable Flag bits in a reference hierarchy.

This method calls ClearAFlag on the ReferenceMaker and all references from it, recursively, with the specified mask

Parameters
rm- The handle to the root ReferenceMaker to enumerate from
maskThe bits to turn off in the Animatable flags
CoreExport void ClearAFlagInAllAnimatables ( DWORD  mask)

Clears the specified Animatable Flag bits on all Animatables.

This method calls ClearAFlag on all Animatables with the specified mask

Parameters
maskThe bits to turn off in the Animatable flags
CoreExport BOOL DependsOn ( RefMakerHandle  mkr,
RefMakerHandle  targ 
)

Checks if there is a path of references from a ReferenceMaker to a ReferenceTarget.

Parameters
mkr- The handle to the ReferenceMaker
targ- The handle to the ReferenceTarget
Returns
TRUE if there is a path of references from the to targ. This returns TRUE if mkr==targ)
CoreExport DWORD GetSavingVersion ( )

Function to find out if we are saving an old version of a .MAX file.

Returns
  • If this returns 0, then either we are not in a save or we are saving the current version.
  • If it returns non-zero, it is the 3ds Max release number being saved, such as MAX_RELEASE_R12, etc This function can be used in NumRefs() and GetRef() to make an objects references appear as they did in the old Max version.
See also
ISave::SavingVersion()
CoreExport DWORD SetSavingVersion ( DWORD  version)

Function used internally to maintain the SavingVersion number, which should not be called by plugins.

CoreExport void DisableRefMsgs ( )

Disable reference messages globally.

Beware Use with extreme caution. Used for speeding up File/Reset, but not recommended anywhere else. (DS 3/16/00) Note: the following reference notification messages are not disabled when reference messages are globally disabled: REFMSG_GET_PARAM_NAME and REFMSG_TARGET_DELETED

CoreExport void EnableRefMsgs ( )

Enable reference messages globally.

Beware: Use with extreme caution. Used for speeding up File/Reset, but not recommended anywhere else. (DS 3/16/00)