3ds Max C++ API Reference
|
Class for managing an object xref record. More...
#include <iXRefObjRecord.h>
Public Types | |
enum | FPFuncIDs { kfpItemCount , kfpIsEmpty , kfpGetItem , kfpGetItems , kfpGetChildRecords , kfpGetParentRecords , kfpGetRootRecords , kfpIsNested , kfpGetIncludeAll , kfpSetIncludeAll , kfpGetAutoUpdate , kfpSetAutoUpdate , kfpGetEnabled , kfpSetEnabled , kfpGetUpToDate , kfpSetUpToDate , kfpCheckSrcFileChanged , kfpIsUnresolved , kfpGetSrcFileName , kfpSetSrcFileName , kfpGetSrcFileAssetId , kfpSetSrcFileAssetId , kfpUpdate , kfpGetRecordId , kfpGetHandle , kfpGetXRefOptions , kfpGetDuplicateMatchingLayers , kfpSetDuplicateMatchingLayers } |
enum | FPEnums { kfpXRefItemTypes , kfpXRefItemTypesNoAll , kfpXrefOptions } |
![]() | |
enum | LifetimeType { noRelease , immediateRelease , wantsRelease , serverControlled } |
Public Member Functions | |
virtual Interface_ID | GetID () |
virtual FPInterfaceDesc * | GetDesc () |
FN_1 (kfpItemCount, TYPE_DWORD, FPItemCount, TYPE_ENUM_TAB_BR) | |
FN_2 (kfpGetItem, TYPE_REFTARG, FPGetItem, TYPE_INDEX, TYPE_ENUM) | |
FN_2 (kfpGetItems, TYPE_DWORD, FPGetItems, TYPE_ENUM_TAB_BR, TYPE_REFTARG_TAB_BR) | |
FN_1 (kfpGetChildRecords, TYPE_DWORD, FPGetChildRecords, TYPE_INTERFACE_TAB_BR) | |
FN_1 (kfpGetParentRecords, TYPE_DWORD, FPGetParentRecords, TYPE_INTERFACE_TAB_BR) | |
FN_1 (kfpGetRootRecords, TYPE_DWORD, FPGetRootRecords, TYPE_INTERFACE_TAB_BR) | |
FN_0 (kfpCheckSrcFileChanged, TYPE_bool, CheckSrcFileChanged) | |
FN_0 (kfpUpdate, TYPE_bool, Update) | |
PROP_FNS (kfpGetIncludeAll, IsIncludeAll, kfpSetIncludeAll, SetIncludeAll, TYPE_bool) | |
PROP_FNS (kfpGetAutoUpdate, IsAutoUpdate, kfpSetAutoUpdate, SetAutoUpdate, TYPE_bool) | |
PROP_FNS (kfpGetEnabled, IsEnabled, kfpSetEnabled, SetEnable, TYPE_bool) | |
PROP_FNS (kfpGetUpToDate, GetUpToDate, kfpSetUpToDate, SetUpToDate, TYPE_bool) | |
RO_PROP_FN (kfpIsEmpty, IsEmpty, TYPE_bool) | |
RO_PROP_FN (kfpIsUnresolved, IsUnresolved, TYPE_bool) | |
PROP_FNS (kfpGetSrcFileName, FPGetSrcFileName, kfpSetSrcFileName, FPSetSrcFileName, TYPE_FILENAME) | |
RO_PROP_FN (kfpGetHandle, GetHandle, TYPE_DWORD) | |
RO_PROP_FN (kfpGetXRefOptions, FPGetXRefOptions, TYPE_ENUM_TAB_BV) | |
RO_PROP_FN (kfpIsNested, IsNested, TYPE_bool) | |
XRef Item Access | |
Retrieves the number of xref items stored in this record.
| |
virtual unsigned int | ItemCount (IXRefItem::XRefItemType itemType) const =0 |
virtual unsigned int | GetItems (IXRefItem::XRefItemType itemType, Tab< ReferenceTarget * > &xrefItems) const =0 |
Retrieves all the xref items of the specified type. | |
virtual ReferenceTarget * | GetItem (unsigned int i, IXRefItem::XRefItemType itemType) const =0 |
Retrieves the i-th xref item of the specified type. | |
virtual bool | IsEmpty () const =0 |
Allows to verify whether this record contains any xref items. | |
Nested XRef Record Management | |
When xrefing scene entities that are themselves xrefs, nested xref records are created. The following methods allow finding and working with nested xref records. | |
virtual unsigned int | GetChildRecords (Tab< IObjXRefRecord * > &childRecords) const =0 |
Retrieves all child xref records of this record. | |
virtual unsigned int | GetParentRecords (Tab< IObjXRefRecord * > &parentRecords) const =0 |
Retrieves all parent xref records of this record. | |
virtual unsigned int | GetRootRecords (Tab< IObjXRefRecord * > &rootRecords) const =0 |
Retrieves all root (top-level) xref records of this record. | |
virtual bool | IsNested () const =0 |
Retrives whether this xref record has parent records or not. | |
XRef Record State Access | |
The following methods allow for setting and retrieving options used when xrefing scene entities. These options apply to the whole xrefing operation rather than to individual xref items. | |
virtual unsigned int | GetXRefOptions () const =0 |
Retrives the options used to create this xref record. | |
virtual bool | IsIncludeAll () const =0 |
Retrieves whether all scene entities are xrefed from this record's source file. | |
virtual void | SetIncludeAll (bool bEnable)=0 |
Sets the xrefing of all scene entities from this record's source file. | |
virtual bool | IsEnabled () const =0 |
Retrieves the enabled state of this xref record. | |
virtual void | SetEnable (bool bEnable)=0 |
Sets the enabled state of this xref record. | |
virtual bool | IsAutoUpdate () const =0 |
Retrieves whether auto-update is enabled for this xref record. | |
virtual void | SetAutoUpdate (bool bEnable)=0 |
Sets the state of the auto-upate for this xref record. | |
virtual bool | GetUpToDate () const =0 |
Allows to verify whether the xref record is up-to-date. | |
virtual void | SetUpToDate (bool bUpToDate)=0 |
Allows to set an xref record as out-of-date. | |
virtual bool | CheckSrcFileChanged ()=0 |
Verifies whether the source file of this xref record has changed since the record was last updated. | |
virtual bool | IsUnresolved () const =0 |
Allows to verify whether the xref record is unresolved. | |
virtual const MaxSDK::AssetManagement::AssetUser & | GetSrcFile () const =0 |
Retrieves the asset Id of the source file. | |
virtual const MSTR & | GetParentSrcFileName () const =0 |
Returns the parent Xref record source file name. | |
XRef Record Management | |
Updates the xref record by reloading its xref items from the source file. | |
virtual bool | Update ()=0 |
The xref entities are reloaded according to the currently set options. | |
virtual XRefRecordHandle | GetHandle () const =0 |
Retrieves the record's unique handle. | |
![]() | |
FPMixinInterface () | |
virtual LifetimeType | LifetimeControl () |
virtual CoreExport bool | RegisterNotifyCallback (InterfaceNotifyCallback *incb) |
virtual void | UnRegisterNotifyCallback (InterfaceNotifyCallback *incb) |
CoreExport | ~FPMixinInterface () |
virtual BaseInterface * | GetInterface (Interface_ID id) |
virtual FPInterfaceDesc * | GetDescByID (Interface_ID id) |
virtual Interface_ID | GetID () |
![]() | |
virtual BaseInterface * | GetInterface (Interface_ID id) |
virtual FPInterfaceDesc * | GetDesc ()=0 |
virtual CoreExport FPStatus | Invoke (FunctionID fid, TimeValue t=0, FPParams *params=NULL) |
virtual FPStatus | Invoke (FunctionID fid, FPParams *params) |
virtual CoreExport FPStatus | Invoke (FunctionID fid, TimeValue t, FPValue &result, FPParams *params=NULL) |
virtual FPStatus | Invoke (FunctionID fid, FPValue &result, FPParams *params=NULL) |
virtual CoreExport FunctionID | FindFn (const MCHAR *name) |
virtual CoreExport BOOL | IsEnabled (FunctionID actionID) |
virtual CoreExport BOOL | IsChecked (FunctionID actionID) |
virtual CoreExport BOOL | IsVisible (FunctionID actionID) |
virtual CoreExport FunctionID | GetIsEnabled (FunctionID actionID) |
virtual CoreExport FunctionID | GetIsChecked (FunctionID actionID) |
virtual CoreExport FunctionID | GetIsVisible (FunctionID actionID) |
virtual ActionTable * | GetActionTable () |
virtual void | EnableActions (BOOL onOff) |
![]() | |
virtual UtilExport | ~BaseInterface () |
Destructor. | |
UtilExport BaseInterface * | GetInterface (Interface_ID id) override |
virtual UtilExport Interface_ID | GetID () |
virtual LifetimeType | LifetimeControl () |
virtual bool | RegisterNotifyCallback (InterfaceNotifyCallback *incb) |
virtual void | UnRegisterNotifyCallback (InterfaceNotifyCallback *incb) |
virtual BaseInterface * | AcquireInterface () |
virtual void | ReleaseInterface () |
virtual void | DeleteInterface () |
virtual BaseInterface * | CloneInterface (void *remapDir=nullptr) |
![]() | |
virtual UtilExport | ~InterfaceServer () |
Destructor. | |
virtual UtilExport BaseInterface * | GetInterface (Interface_ID id) |
template<class InterfaceType > | |
InterfaceType * | GetTypedInterface () |
Static Public Member Functions | |
static IObjXRefRecord * | GetInterface (InterfaceServer *is) |
Retrieves the IObjXRefRecord interface from an InterfaceServer. | |
![]() | |
static UtilExport void * | operator new (size_t size) |
Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown. | |
static UtilExport void * | operator new (size_t size, const std::nothrow_t &e) |
Standard new operator used to allocate objects if there is insufficient memory, NULL will be returned. | |
static UtilExport void * | operator new (size_t size, const char *filename, int line) |
New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, an exception will be thrown. | |
static UtilExport void * | operator new (size_t size, int block_type, const char *filename, int line) |
New operator used to allocate objects that takes the type of memory, filename and line number where the new was called If there is insufficient memory, an exception will be thrown. | |
static UtilExport void * | operator new (size_t size, const std::nothrow_t &e, const char *filename, int line) |
New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, NULL will be returned. | |
static UtilExport void * | operator new (size_t size, unsigned long flags) |
New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, an exception will be thrown. | |
static UtilExport void * | operator new (size_t size, const std::nothrow_t &e, unsigned long flags) |
New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, NULL will be returned. | |
static UtilExport void * | operator new[] (size_t size) |
New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. | |
static UtilExport void * | operator new[] (size_t size, const std::nothrow_t &e) |
New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. | |
static UtilExport void * | operator new[] (size_t size, const char *filename, int line) |
New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. | |
static UtilExport void * | operator new[] (size_t size, int block_type, const char *filename, int line) |
New operator used to allocate arrays of objects. | |
static UtilExport void * | operator new[] (size_t size, const std::nothrow_t &e, const char *filename, int line) |
New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. | |
static UtilExport void * | operator new[] (size_t size, unsigned long flags) |
New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. | |
static UtilExport void * | operator new[] (size_t size, const std::nothrow_t &e, unsigned long flags) |
New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. | |
static UtilExport void | operator delete (void *ptr) |
Standard delete operator used to deallocate an object If the pointer is invalid, an exception will be thrown. | |
static UtilExport void | operator delete (void *ptr, const std::nothrow_t &e) |
Standard delete operator used to deallocate an object If the pointer is invalid, nothing will happen. | |
static UtilExport void | operator delete (void *ptr, const char *filename, int line) |
Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. | |
static UtilExport void | operator delete (void *ptr, int block_type, const char *filename, int line) |
Delete operator used to deallocate an object that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. | |
static UtilExport void | operator delete (void *ptr, const std::nothrow_t &e, const char *filename, int line) |
Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. | |
static UtilExport void | operator delete (void *ptr, unsigned long flags) |
Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. | |
static UtilExport void | operator delete (void *ptr, const std::nothrow_t &e, unsigned long flags) |
Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, nothing will happen. | |
static UtilExport void | operator delete[] (void *ptr) |
Standard delete operator used to deallocate an array of objects If the pointer is invalid, an exception will be thrown. | |
static UtilExport void | operator delete[] (void *ptr, const std::nothrow_t &e) |
Standard delete operator used to deallocate an array of objects If the pointer is invalid, nothing will happen. | |
static UtilExport void | operator delete[] (void *ptr, const char *filename, int line) |
Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. | |
static UtilExport void | operator delete[] (void *ptr, int block_type, const char *filename, int line) |
Delete operator used to deallocate an array of objects that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. | |
static UtilExport void | operator delete[] (void *ptr, const std::nothrow_t &e, const char *filename, int line) |
Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. | |
static UtilExport void | operator delete[] (void *ptr, unsigned long flags) |
Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. | |
static UtilExport void | operator delete[] (void *ptr, const std::nothrow_t &e, unsigned long flags) |
Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. | |
static UtilExport void * | operator new (size_t size, void *placement_ptr) |
Placement new operator. | |
static UtilExport void | operator delete (void *ptr, void *placement_ptr) |
Placement delete operator. | |
static UtilExport void * | aligned_malloc (size_t size, size_t alignment) |
Allocates memory on a specified alignment boundary. | |
static UtilExport void * | aligned_realloc (void *ptr, size_t size, size_t alignment) |
Reallocates memory on a specified alignment boundary. | |
static UtilExport void | aligned_free (void *ptr) |
Frees a block of memory that was allocated with aligned_malloc/aligned_realloc. | |
Additional Inherited Members | |
![]() | |
static CoreExport FPInterfaceDesc | nullInterface |
![]() | |
FPMixinInterface (const FPMixinInterface &rhs) | |
FPMixinInterface & | operator= (const FPMixinInterface &rhs) |
![]() | |
virtual FPStatus | _dispatch_fn (FunctionID fid, TimeValue t, FPValue &result, FPParams *p) |
![]() | |
Tab< InterfaceNotifyCallback * > * | interfaceNotifyCBs |
Class for managing an object xref record.
Xref records store xref items and information regarding the xref operation/transaction that created them. Xref records are created by and can be retrieved from the Object Xref Manager (see class IObjXRefManager8). Xref records are not created when xrefing a whole scene via the scene xref feature.
enum FPFuncIDs |
enum FPEnums |
Enumerator | |
---|---|
kfpXRefItemTypes | |
kfpXRefItemTypesNoAll | |
kfpXrefOptions |
|
pure virtual |
[in] | itemType | - One of the predefined xref item types IXRefItem::XRefItemType |
|
pure virtual |
Retrieves all the xref items of the specified type.
Note that any xref atmospheric item returned by this method will become invalid if all other types of items are removed from this record. Also, any of of the xref items returned by this method could become invalid after an operation that modifies the contents of the xref record.
[in] | itemType | - A combination of predefined xref item types IXRefItem::XRefItemType |
[in,out] | xrefItems | - An array where the xref items will be returned. The array is not cleared, so its existent elements will be preserved. |
|
pure virtual |
Retrieves the i-th xref item of the specified type.
[in] | i | - The index of the xref item to retrieve. |
[in] | itemType | - One of the predefined xref item types IXRefItem::XRefItemType |
|
pure virtual |
Allows to verify whether this record contains any xref items.
Note that empty xref records are automatically deleted by the system, so this method should never return true, except when called before the system had a chance to delete empty xref records. Also note that xref records containing only xref atmospherics will be deleted automatically by the system.
|
pure virtual |
Retrieves all child xref records of this record.
[out] | childRecords | - Array of xref records where the child records are retured. The supplied array is not cleared out before the xref records are added to it. The array is guaranteed not to contain duplicate xref records. |
|
pure virtual |
Retrieves all parent xref records of this record.
[out] | parentRecords | - Array of xref records where the parent records are returned. The supplied array is not cleared out before the xref records are added to it. The array is guaranteed not to contain duplicate xref records. |
|
pure virtual |
Retrieves all root (top-level) xref records of this record.
[out] | rootRecords | - Array of xref records where the root records are returned. The supplied array cleared out before the xref records are added to it. The array is guaranteed not to contain duplicate xref records. |
|
pure virtual |
Retrives whether this xref record has parent records or not.
This method uses a more efficient way of determining whether this xref record is nested or not than calling GetParentRecords.
|
pure virtual |
Retrives the options used to create this xref record.
These options cannot be modifed once the xref record has been created.
|
pure virtual |
Retrieves whether all scene entities are xrefed from this record's source file.
When this option is turned on, the next update operation of this xref record will xref all scene entities that have not been xrefed yet from the its source file.
|
pure virtual |
Sets the xrefing of all scene entities from this record's source file.
[in] | bEnable | - If true, the include-all option is enabled, otherwise it's disabled |
|
pure virtual |
Retrieves the enabled state of this xref record.
Enabled xref records can be updated, while disabled xref records cannot.
|
pure virtual |
Sets the enabled state of this xref record.
When disabling an xref record, the source items of its xref items are un-loaded from memory. Note that opening a main file containing disabled xref records results in unresolved xref items. Re-enabling and updating the record, re-resolves the xref items.
[in] | bEnable | - If true, the xref record is enabled, otherwise it's disabled |
|
pure virtual |
Retrieves whether auto-update is enabled for this xref record.
When Auto-update is enabled, the xref record is automatically updated as soon as the source file changes.
|
pure virtual |
Sets the state of the auto-upate for this xref record.
[in] | bEnable | - If true, auto-update is enabled for this xref record, otherwise it's disabled. |
|
pure virtual |
Allows to verify whether the xref record is up-to-date.
The xref record is up-to-date if it's been updated with the source items from the latest version of the source file. This method will report the current value of the up-to-date state of this xref record. To trigger a verification of whether the source file of this xref record has changed, use CheckSrcFileChanged.
|
pure virtual |
Allows to set an xref record as out-of-date.
Only out-of-date records are processed by an update request.
[in] | bUpToDate | - false to set the record as ou-of-date, otherwise true |
|
pure virtual |
Verifies whether the source file of this xref record has changed since the record was last updated.
Calling this method checks whether the source file is unresolved. If it isn't, it updates the up-to-date flag of this xref record by comparing the date and time of the source file with the date and time the xref record was last updated.
|
pure virtual |
Allows to verify whether the xref record is unresolved.
An xref record is unresolved if the source file name and path is not valid. Unresolved xref records are not discarded by the system because they may get re-resolved on a subsequent update of the xref record if the source file path and name becomes valid.
|
pure virtual |
Retrieves the asset Id of the source file.
The source file of an xref record is the file from where the source scene entities xrefed via this xref record come from.
|
pure virtual |
Returns the parent Xref record source file name.
|
pure virtual |
The xref entities are reloaded according to the currently set options.
For example, the xref record will not be updated if it is disabled.
|
pure virtual |
Retrieves the record's unique handle.
Each xref record is identified by a unique handle. The handle value is unique only within the current scene. Reseting the scene is considered to start a new scene. The handle of the xref records is not persisted.
|
inlinestatic |
Retrieves the IObjXRefRecord interface from an InterfaceServer.
[in] | is | - Pointer to InterfaceServer |
|
inlinevirtual |
Reimplemented from FPMixinInterface.
|
inlinevirtual |
Implements FPInterface.
FN_1 | ( | kfpItemCount | , |
TYPE_DWORD | , | ||
FPItemCount | , | ||
TYPE_ENUM_TAB_BR | |||
) |
FN_2 | ( | kfpGetItem | , |
TYPE_REFTARG | , | ||
FPGetItem | , | ||
TYPE_INDEX | , | ||
TYPE_ENUM | |||
) |
FN_2 | ( | kfpGetItems | , |
TYPE_DWORD | , | ||
FPGetItems | , | ||
TYPE_ENUM_TAB_BR | , | ||
TYPE_REFTARG_TAB_BR | |||
) |
FN_1 | ( | kfpGetChildRecords | , |
TYPE_DWORD | , | ||
FPGetChildRecords | , | ||
TYPE_INTERFACE_TAB_BR | |||
) |
FN_1 | ( | kfpGetParentRecords | , |
TYPE_DWORD | , | ||
FPGetParentRecords | , | ||
TYPE_INTERFACE_TAB_BR | |||
) |
FN_1 | ( | kfpGetRootRecords | , |
TYPE_DWORD | , | ||
FPGetRootRecords | , | ||
TYPE_INTERFACE_TAB_BR | |||
) |
FN_0 | ( | kfpCheckSrcFileChanged | , |
TYPE_bool | , | ||
CheckSrcFileChanged | |||
) |
PROP_FNS | ( | kfpGetIncludeAll | , |
IsIncludeAll | , | ||
kfpSetIncludeAll | , | ||
SetIncludeAll | , | ||
TYPE_bool | |||
) |
PROP_FNS | ( | kfpGetAutoUpdate | , |
IsAutoUpdate | , | ||
kfpSetAutoUpdate | , | ||
SetAutoUpdate | , | ||
TYPE_bool | |||
) |
PROP_FNS | ( | kfpGetEnabled | , |
IsEnabled | , | ||
kfpSetEnabled | , | ||
SetEnable | , | ||
TYPE_bool | |||
) |
PROP_FNS | ( | kfpGetUpToDate | , |
GetUpToDate | , | ||
kfpSetUpToDate | , | ||
SetUpToDate | , | ||
TYPE_bool | |||
) |
RO_PROP_FN | ( | kfpIsEmpty | , |
IsEmpty | , | ||
TYPE_bool | |||
) |
RO_PROP_FN | ( | kfpIsUnresolved | , |
IsUnresolved | , | ||
TYPE_bool | |||
) |
PROP_FNS | ( | kfpGetSrcFileName | , |
FPGetSrcFileName | , | ||
kfpSetSrcFileName | , | ||
FPSetSrcFileName | , | ||
TYPE_FILENAME | |||
) |
RO_PROP_FN | ( | kfpGetHandle | , |
GetHandle | , | ||
TYPE_DWORD | |||
) |
RO_PROP_FN | ( | kfpGetXRefOptions | , |
FPGetXRefOptions | , | ||
TYPE_ENUM_TAB_BV | |||
) |
RO_PROP_FN | ( | kfpIsNested | , |
IsNested | , | ||
TYPE_bool | |||
) |