IXRefProxy Class Reference

#include <iXrefProxy.h>

Class Description

Class for working with the proxy aspect of an xref scene entity.

Some types of xref scene entities allow to be replaced by a proxy (an alternate scene entity) that may reside in a different scene than the xrefed scene entity itself. The proxy scene entity can have a different type (superclass and class ids) than the xrefed scene entity. Proxies can be used to replace the actual xref scene entity in the viewport and/or rendering. Some xref scene entities provided by the system, such as xref objects, expose the IXRefProxy interface. In order to retrieve this interface one must call IXRefProxy::GetInterface with a reference to a scene entity.

+ Inheritance diagram for IXRefProxy:

Public Types

enum  {
  kfpGetProxyFileName, kfpSetProxyFileName, kfpGetProxyFileAssetId, kfpSetProxyFileAssetId,
  kfpGetProxyItemName, kfpSetProxyItemName, kfpGetProxyRecord, kfpGetUseForDisplay,
  kfpSetUseForDisplay, kfpGetUseForRendering, kfpSetUseForRendering
}
 
- Public Types inherited from BaseInterface
enum  LifetimeType { noRelease, immediateRelease, wantsRelease, serverControlled }
 

Public Member Functions

virtual const MaxSDK::AssetManagement::AssetUserGetProxyFile () const =0
 Retrieves the proxy file asset. More...
 
virtual const MCHARGetProxyItemName () const =0
 Retrieves the name of the proxy scene entity. More...
 
virtual IObjXRefRecordGetProxyRecord () const =0
 Retrieves the xref record this xref proxy belongs to. More...
 
virtual void SetUseForDisplay (bool bUseProxy)=0
 Allows to turn on or off the use of the proxy for viewport display. More...
 
virtual bool GetUseForDisplay () const =0
 Retrieves whether the proxy is being used for viewport display. More...
 
virtual void SetUseForRendering (bool bUseProxy)=0
 Allows to turn on or off the use of the proxy for rendering purposes. More...
 
virtual bool GetUseForRendering () const =0
 Retrieves whether the proxy is being used for rendering purposes. More...
 
virtual Interface_ID GetID ()
 
 PROP_FNS (kfpGetProxyFileName, FPGetProxyFileName, kfpSetProxyFileName, FPSetProxyFileName, TYPE_FILENAME)
 
 PROP_FNS (kfpGetProxyItemName, GetProxyItemName, kfpSetProxyItemName, FPSetProxyItemName, TYPE_STRING)
 
 RO_PROP_FN (kfpGetProxyRecord, GetProxyRecord, TYPE_INTERFACE)
 
 PROP_FNS (kfpGetUseForDisplay, GetUseForDisplay, kfpSetUseForDisplay, SetUseForDisplay, TYPE_bool)
 
 PROP_FNS (kfpGetUseForRendering, GetUseForRendering, kfpSetUseForRendering, SetUseForRendering, TYPE_bool)
 
virtual FPInterfaceDescGetDesc ()
 
- Public Member Functions inherited from FPMixinInterface
 FPMixinInterface ()
 
virtual LifetimeType LifetimeControl ()
 
virtual CoreExport bool RegisterNotifyCallback (InterfaceNotifyCallback *incb)
 
virtual void UnRegisterNotifyCallback (InterfaceNotifyCallback *incb)
 
CoreExport ~FPMixinInterface ()
 
virtual BaseInterfaceGetInterface (Interface_ID id)
 
virtual FPInterfaceDescGetDescByID (Interface_ID id)
 
- Public Member Functions inherited from FPInterface
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 ActionTableGetActionTable ()
 
virtual void EnableActions (BOOL onOff)
 
- Public Member Functions inherited from BaseInterface
virtual UtilExport ~BaseInterface ()
 Destructor. More...
 
virtual BaseInterfaceAcquireInterface ()
 
virtual void ReleaseInterface ()
 
virtual void DeleteInterface ()
 
virtual BaseInterfaceCloneInterface (void *remapDir=NULL)
 
- Public Member Functions inherited from InterfaceServer
virtual UtilExport ~InterfaceServer ()
 Destructor. More...
 

Static Public Member Functions

static bool IsIXRefProxy (InterfaceServer &is)
 Allows to determine whethe a scene entity is implements this interface. More...
 
static IXRefProxyGetInterface (InterfaceServer &is)
 Retrieves the IXRefProxy interface from a scene entity. More...
 
- Static Public Member Functions inherited from MaxHeapOperators
static UtilExport voidoperator new (size_t size)
 Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator 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. More...
 
static UtilExport voidoperator 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. More...
 
static UtilExport voidoperator 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. More...
 
static UtilExport voidoperator 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. More...
 
static UtilExport voidoperator 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. More...
 
static UtilExport voidoperator 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. More...
 
static UtilExport voidoperator new[] (size_t size)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator 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. More...
 
static UtilExport voidoperator 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. More...
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects. More...
 
static UtilExport voidoperator 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. More...
 
static UtilExport voidoperator 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. More...
 
static UtilExport voidoperator 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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator. More...
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator. More...
 

Static Public Attributes

static FPInterfaceDesc mFPInterfaceDesc
 
- Static Public Attributes inherited from FPInterface
static CoreExport FPInterfaceDesc nullInterface
 

Protected Member Functions

Function Publishing methods
virtual void FPSetProxyFileName (const MCHAR *fileName)=0
 Sets file name of xref proxy. Implemented by the system. More...
 
virtual const MCHARFPGetProxyFileName () const =0
 Gets file name of xref proxy. Implemented by the system. More...
 
virtual void FPSetProxyItemName (const MCHAR *itemName)=0
 Sets item name of xref proxy. Implemented by the system. More...
 
- Protected Member Functions inherited from FPMixinInterface
 FPMixinInterface (const FPMixinInterface &rhs)
 
FPMixinInterfaceoperator= (const FPMixinInterface &rhs)
 
- Protected Member Functions inherited from FPInterface
virtual FPStatus _dispatch_fn (FunctionID fid, TimeValue t, FPValue &result, FPParams *p)
 

Additional Inherited Members

- Protected Attributes inherited from FPMixinInterface
Tab< InterfaceNotifyCallback * > * interfaceNotifyCBs
 

Member Enumeration Documentation

anonymous enum
Enumerator
kfpGetProxyFileName 
kfpSetProxyFileName 
kfpGetProxyFileAssetId 
kfpSetProxyFileAssetId 
kfpGetProxyItemName 
kfpSetProxyItemName 
kfpGetProxyRecord 
kfpGetUseForDisplay 
kfpSetUseForDisplay 
kfpGetUseForRendering 
kfpSetUseForRendering 
96  {
105  };
Definition: iXrefProxy.h:97
Definition: iXrefProxy.h:98
Definition: iXrefProxy.h:99
Definition: iXrefProxy.h:104
Definition: iXrefProxy.h:101
Definition: iXrefProxy.h:97
Definition: iXrefProxy.h:99
Definition: iXrefProxy.h:98
Definition: iXrefProxy.h:103
Definition: iXrefProxy.h:102
Definition: iXrefProxy.h:100

Member Function Documentation

virtual const MaxSDK::AssetManagement::AssetUser& GetProxyFile ( ) const
pure virtual

Retrieves the proxy file asset.

Returns
- The proxy file asset.
virtual const MCHAR* GetProxyItemName ( ) const
pure virtual

Retrieves the name of the proxy scene entity.

Returns
- Pointer to the name of the proxy scene entity or NULL if there's no proxy object set up.
virtual IObjXRefRecord* GetProxyRecord ( ) const
pure virtual

Retrieves the xref record this xref proxy belongs to.

Returns
The xref record this xref proxy belongs to. An xref proxy can belong to only one xref record at any one time. A return value of NULL, indicates that the proxy is not part of an xref record yet.
virtual void SetUseForDisplay ( bool  bUseProxy)
pure virtual

Allows to turn on or off the use of the proxy for viewport display.

Parameters
[in]bUseProxy- If true, the proxy is to be displayed in the viewport instead of the xrefed scene entity, otherwise false
virtual bool GetUseForDisplay ( ) const
pure virtual

Retrieves whether the proxy is being used for viewport display.

Returns
bool - True if the proxy is displayed in the viewport, otherwise false
virtual void SetUseForRendering ( bool  bUseProxy)
pure virtual

Allows to turn on or off the use of the proxy for rendering purposes.

Parameters
[in]bUseProxy- If true, the proxy is to be rendered instead of the xrefed scene entity, otherwise false
virtual bool GetUseForRendering ( ) const
pure virtual

Retrieves whether the proxy is being used for rendering purposes.

Returns
bool - True if the proxy is being rendered, otherwise false
static bool IsIXRefProxy ( InterfaceServer is)
inlinestatic

Allows to determine whethe a scene entity is implements this interface.

Parameters
[in]is- Reference to scene entity
Returns
- true if the scene entity implements the IXRefProxy interface, false otherwise
80  {
81  return (is.GetInterface(IID_XREF_PROXY) != NULL);
82  };
#define NULL
Definition: autoptr.h:18
#define IID_XREF_PROXY
Id for IXRefProxy interface.
Definition: iXrefProxy.h:22
virtual UtilExport BaseInterface * GetInterface(Interface_ID id)
static IXRefProxy* GetInterface ( InterfaceServer is)
inlinestatic

Retrieves the IXRefProxy interface from a scene entity.

Parameters
[in]is- Reference to scene entity
Returns
- Pointer to the IXRefProxy interface of the scene entity or NULL if it does not support the proxy feature
89  {
90  return static_cast<IXRefProxy*>(is.GetInterface(IID_XREF_PROXY));
91  };
Class for working with the proxy aspect of an xref scene entity.
Definition: iXrefProxy.h:34
#define IID_XREF_PROXY
Id for IXRefProxy interface.
Definition: iXrefProxy.h:22
virtual UtilExport BaseInterface * GetInterface(Interface_ID id)
virtual Interface_ID GetID ( )
inlinevirtual
Remarks
This method overrides GetID() in those interfaces that do not publish metadata but instead have a unique Interface_ID for quick internal identification in implementation code that might be shared by a bunch of mixin interfaces.
Returns
The Interface_ID.
Default Implementation:
{ return GetDesc()->ID; }

Reimplemented from FPMixinInterface.

94 { return IID_XREF_PROXY; }
#define IID_XREF_PROXY
Id for IXRefProxy interface.
Definition: iXrefProxy.h:22
RO_PROP_FN ( kfpGetProxyRecord  ,
GetProxyRecord  ,
TYPE_INTERFACE   
)
virtual FPInterfaceDesc* GetDesc ( )
inlinevirtual
Remarks
Returns a pointer to the class which contains the interface metadata.

Implements FPInterface.

116 { return &mFPInterfaceDesc; }
static FPInterfaceDesc mFPInterfaceDesc
Definition: iXrefProxy.h:117
virtual void FPSetProxyFileName ( const MCHAR fileName)
protectedpure virtual

Sets file name of xref proxy. Implemented by the system.

virtual const MCHAR* FPGetProxyFileName ( ) const
protectedpure virtual

Gets file name of xref proxy. Implemented by the system.

virtual void FPSetProxyItemName ( const MCHAR itemName)
protectedpure virtual

Sets item name of xref proxy. Implemented by the system.

Member Data Documentation

FPInterfaceDesc mFPInterfaceDesc
static