#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 void * | ReferenceData |
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 ReferenceTarget * | RefTargetHandle |
Creates a typename for ReferenceTarget pointers. More... | |
typedef ReferenceMaker * | RefMakerHandle |
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 RemapDir * | NewRemapDir (BOOL use_A_WORK2_flag=FALSE) |
Gets a pointer to a default version of a RemapDir. More... | |
CoreExport ReferenceTarget * | CloneRefHierarchy (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... | |
#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 void* ReferenceData |
typedef unsigned int TargetParam |
typedef ReferenceTarget* RefTargetHandle |
Creates a typename for ReferenceTarget pointers.
typedef ReferenceMaker* RefMakerHandle |
Creates a typename for ReferenceMaker pointers.
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. |
Specified as argument to NotifyDependents to specify level of optimizations used.
CoreExport bool CanOptimizeDependentNotifications | ( | NotifyDependentsOption | notifyDependentsOption, |
RefMessage | message, | ||
NotifyDependentsOption & | propagated_notifyDependentsOption | ||
) |
Returns true if this RefMessage can have redundant notifications optimized (inhibited).
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. |
CoreExport RemapDir* NewRemapDir | ( | BOOL | use_A_WORK2_flag = FALSE | ) |
Gets a pointer to a default version of a RemapDir.
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.
you should say:
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:
rm | - A pointer to the reference target to clone. |
CoreExport void RegisterGlobalReference | ( | GlobalReferenceMaker * | maker | ) |
Registers an instance of this class whose NotifyRefChanged() method will receive the messages.
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.
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
rm | - The handle to the root ReferenceMaker to enumerate from |
mask | The 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
mask | The 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.
mkr | - The handle to the ReferenceMaker |
targ | - The handle to the ReferenceTarget |
CoreExport DWORD GetSavingVersion | ( | ) |
Function to find out if we are saving an old version of a .MAX file.
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)