3ds Max C++ API Reference
|
Generic interface that represents an xrefed scene entity. More...
#include <iXrefItem.h>
Public Types | |
enum | XRefItemType { kType_Object = 1<<0 , kType_Material = 1<<1 , kType_Controller = 1<<2 , kType_Atmospheric = 1<<3 , kType_All , kType_All_No_Atmospherics } |
List of xref item types or categories of xref-able scene entities. More... | |
enum | { kfpGetSrcFileName , kfpSetSrcFileName , kfpGetSrcItemName , kfpSetSrcItemName , kfpGetSrcItem , kfpGetParentItems , kfpGetChildItems , kfpGetRootItems , kfpGetXRefRecord , kfpIsUnresolved , kfpIsNested , kfpGetNodes , kfpLastID } |
![]() | |
enum | LifetimeType { noRelease , immediateRelease , wantsRelease , serverControlled } |
Public Member Functions | |
virtual Interface_ID | GetID () |
PROP_FNS (kfpGetSrcFileName, FPGetSrcFileName, kfpSetSrcFileName, FPSetSrcFileName, TYPE_FILENAME) | |
PROP_FNS (kfpGetSrcItemName, GetSrcItemName, kfpSetSrcItemName, FPSetSrcItemName, TYPE_STRING) | |
RO_PROP_FN (kfpGetXRefRecord, GetXRefRecord, TYPE_INTERFACE) | |
RO_PROP_FN (kfpIsUnresolved, IsUnresolved, TYPE_bool) | |
RO_PROP_FN (kfpIsNested, IsNested, TYPE_bool) | |
FN_1 (kfpGetSrcItem, TYPE_REFTARG, GetSrcItem, TYPE_bool) | |
FN_1 (kfpGetParentItems, TYPE_DWORD, GetParentItems, TYPE_REFTARG_TAB_BR) | |
FN_1 (kfpGetRootItems, TYPE_DWORD, GetRootItems, TYPE_REFTARG_TAB_BR) | |
FN_1 (kfpGetChildItems, TYPE_DWORD, GetChildItems, TYPE_REFTARG_TAB_BR) | |
VFN_1 (kfpGetNodes, FPGetNodes, TYPE_INODE_TAB_BR) | |
virtual FPInterfaceDesc * | GetDesc () |
virtual BaseInterface * | GetInterface (Interface_ID id) |
XRef Item Property Access | |
The following methods give access to the properties of xref items. These properties are allowed to be modified only via methods of IObjXRefManager8 in order to ensure the integrity of xref items and records where they are stored. | |
virtual const MaxSDK::AssetManagement::AssetUser & | GetSrcFile () const =0 |
Retrieves the file asset that the source scene entity comes from. | |
virtual const MCHAR * | GetSrcItemName () const =0 |
Retrieves the name of the source scene entity. | |
virtual ReferenceTarget * | GetSrcItem (bool resolveNested=false) const =0 |
Retrieves the source scene entity xrefed by this xref item. | |
virtual bool | IsUnresolved () const =0 |
Allows to verify whether the xref item is unresolved. | |
virtual IObjXRefRecord * | GetXRefRecord () const =0 |
Retrieves the xref record this xref item belongs to. | |
virtual void | GetNodes (INodeTab &xrefNodes) const =0 |
Retrieves the nodes associated with this xref item. | |
Nested XRef Item Management | |
When xrefing scene entities that are themselves xrefs, nested xref items are created. The following methods allow working with nested xref items. | |
virtual unsigned int | GetParentItems (Tab< ReferenceTarget * > &parentItems) const =0 |
Retrieves the xref items under which this xref item is nested. | |
virtual unsigned int | GetChildItems (Tab< ReferenceTarget * > &childItems) const =0 |
Returns the list of every xref item for which GetParentItem() would return 'this'. | |
virtual unsigned int | GetRootItems (Tab< ReferenceTarget * > &rootItems) const =0 |
Retrieves the root (top-level) xref items of this xref item. | |
virtual bool | IsNested () const =0 |
Checks whether this xref item is a nested one. | |
![]() | |
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 bool | IsIXRefItem (InterfaceServer &is) |
Allows to determine whether a scene entity implements this interface. | |
static IXRefItem * | GetInterface (InterfaceServer &is) |
Retrieves the IXRefItem interface from a scene entity. | |
![]() | |
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. | |
Static Public Attributes | |
static FPInterfaceDesc | mFPInterfaceDesc |
![]() | |
static CoreExport FPInterfaceDesc | nullInterface |
Protected Member Functions | |
Function Publishing methods | |
Sets file name of xref. Implemented by the system. | |
virtual void | FPSetSrcFileName (const MCHAR *fileName)=0 |
Gets file name of xref. Implemented by the system. | |
virtual const MCHAR * | FPGetSrcFileName ()=0 |
Gets file name of xref. Implemented by the system. | |
virtual void | FPSetSrcItemName (const MCHAR *itemName)=0 |
Sets item name of xref. Implemented by the system. | |
![]() | |
FPMixinInterface (const FPMixinInterface &rhs) | |
FPMixinInterface & | operator= (const FPMixinInterface &rhs) |
![]() | |
virtual FPStatus | _dispatch_fn (FunctionID fid, TimeValue t, FPValue &result, FPParams *p) |
Additional Inherited Members | |
![]() | |
Tab< InterfaceNotifyCallback * > * | interfaceNotifyCBs |
Generic interface that represents an xrefed scene entity.
This interface exposes services common to all xref scene entities. 3rd party plugins do not need to derive from this interface. Support for xrefing different plugin categories is provided by the system (3ds Max). Each plugin category that supports xrefing is modeled as a class that implements this interface.
Xref items can be created and modified via the Object XRef Manager (IObjXRefManager8), and live in xref records (IObjXRefRecord). An xref item can live in one and only one xref record.
Sub-object animation of a scene entity is maintained when the scene entity is xrefed. Transform animation of a scene entity such as a node is brought into the main file, but is not updated when the xref record is updated.
In order to retrieve this interface from a scene entity, one must call either IXRefItem::GetInterface with a reference to a scene entity (Object, Atmospherics, etc.),
enum XRefItemType |
List of xref item types or categories of xref-able scene entities.
Use the following values when retrieving xref items from xref records.
anonymous enum |
|
pure virtual |
Retrieves the file asset that the source scene entity comes from.
|
pure virtual |
Retrieves the name of the source scene entity.
|
pure virtual |
Retrieves the source scene entity xrefed by this xref item.
[in] | resolveNested | - If true, the method looks for the first non-xref source item. This could be a direct or indirect source item. |
|
pure virtual |
Allows to verify whether the xref item is unresolved.
An xref item is unresolved if the source scene entity is invalid. This can happen for example if the source scene entity does not exist in the source file or the xref item has been pointed to a source file that does not exist. Unresolved xref items will not render, but have a default viewport representation. Unresolved xref items may get re-resolved on a subsequent reload of the xref item's record.
|
pure virtual |
Retrieves the xref record this xref item belongs to.
Retrieves the nodes associated with this xref item.
This method retrieves all the nodes that reference this xref item. If this xref item is an xref atmospheric, no nodes will be reported. If this xref item is nested, this method retrieves the nodes that reference it indirectly. Note that nodes that are not in the scene could also be returned by this method.
[in,out] | xrefNodes | - The tab of nodes that reference this xref item. The tab is not cleared by this method. The tab is guaranteed to not contain duplicated nodes. |
|
pure virtual |
Retrieves the xref items under which this xref item is nested.
A nested xref item can have multiple parent items (when for example a nested xref item is cloned), and all of them have the same type as their child item.
[out] | parentItems | - Array where the parent xref items of this item are returned. The parent xref items are added to the array without clearing it out first. |
|
pure virtual |
Returns the list of every xref item for which GetParentItem() would return 'this'.
A child xref item is a xref item encountered when walking down any given path in the reference hierarchy of this xref item. An xref item may have several child xref items.
[out] | childItems | - Array where the child xref items of this item are returned. The child xref items are added to the array without clearing it out first. |
|
pure virtual |
Retrieves the root (top-level) xref items of this xref item.
This method retrieves all top-level parent xref items of this item. A top-level xref item is an item that does not have an ancestor. The top-level xref item of an item that doesn't have ancestors is itself.
rootItems | - Array where the top-level (root) xref items of this item are returned. This array is guaranteed to contain at least this xref item. |
|
pure virtual |
Checks whether this xref item is a nested one.
This method offers a more efficient way of finding out if this xref item is nested than calling GetParentItems.
|
inlinestatic |
Allows to determine whether a scene entity implements this interface.
[in] | is | - Reference to scene entity |
|
inlinestatic |
|
inlinevirtual |
Reimplemented from FPMixinInterface.
PROP_FNS | ( | kfpGetSrcFileName | , |
FPGetSrcFileName | , | ||
kfpSetSrcFileName | , | ||
FPSetSrcFileName | , | ||
TYPE_FILENAME | |||
) |
PROP_FNS | ( | kfpGetSrcItemName | , |
GetSrcItemName | , | ||
kfpSetSrcItemName | , | ||
FPSetSrcItemName | , | ||
TYPE_STRING | |||
) |
RO_PROP_FN | ( | kfpGetXRefRecord | , |
GetXRefRecord | , | ||
TYPE_INTERFACE | |||
) |
RO_PROP_FN | ( | kfpIsUnresolved | , |
IsUnresolved | , | ||
TYPE_bool | |||
) |
RO_PROP_FN | ( | kfpIsNested | , |
IsNested | , | ||
TYPE_bool | |||
) |
FN_1 | ( | kfpGetSrcItem | , |
TYPE_REFTARG | , | ||
GetSrcItem | , | ||
TYPE_bool | |||
) |
FN_1 | ( | kfpGetParentItems | , |
TYPE_DWORD | , | ||
GetParentItems | , | ||
TYPE_REFTARG_TAB_BR | |||
) |
FN_1 | ( | kfpGetRootItems | , |
TYPE_DWORD | , | ||
GetRootItems | , | ||
TYPE_REFTARG_TAB_BR | |||
) |
FN_1 | ( | kfpGetChildItems | , |
TYPE_DWORD | , | ||
GetChildItems | , | ||
TYPE_REFTARG_TAB_BR | |||
) |
VFN_1 | ( | kfpGetNodes | , |
FPGetNodes | , | ||
TYPE_INODE_TAB_BR | |||
) |
|
inlinevirtual |
Implements FPInterface.
Gets file name of xref. Implemented by the system.
|
protectedpure virtual |
Gets file name of xref. Implemented by the system.
Sets item name of xref. Implemented by the system.
|
inlinevirtual |
Reimplemented from FPMixinInterface.
|
static |