Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions

IXRefObject8 Class Reference

Search for all occurrences

Detailed Description

Class representing Xref objects.

This interface groups functionality specific to xref objects. In order to access functionality common to all xref scene entities, use the IXRefItem interface. An xref object acts as a wrapper around the xrefed object (also referred to as the "source object"). For example, requests for evaluating the xref object (Eval) and finding its base object (FindBaseObject) are passed to the source object, as are requests for interfaces. Client or plugin code working with objects should not be required to write xref object specific code, unless the desired functionality is xref specific.

#include <iXrefObj.h>

Inheritance diagram for IXRefObject8:
Inheritance graph
[legend]

List of all members.

Public Types

enum   { kfpGetActiveFileName, kfpGetActiveObjName, kfpGetActiveRecord, kfpGetSourceObject }

Public Member Functions

virtual const
MaxSDK::AssetManagement::AssetUser
GetActiveFile () const =0
  Retrieves the active source file.
virtual const MCHAR *  GetActiveObjName () const =0
  Retrieves the active source item name.
virtual IObjXRefRecord GetActiveRecord () const =0
  Retrieves the active xref record this xref object belongs to.
virtual Object GetSourceObject (bool resolveNested=false, Tab< Modifier * > *modifiers=NULL) const =0
  Retrieves the actual source object behind the XRef.
virtual Interface_ID  GetID ()
BEGIN_FUNCTION_MAP  RO_PROP_FN (kfpGetActiveFileName, FPGetActiveFileName, TYPE_FILENAME)
  RO_PROP_FN (kfpGetActiveObjName, GetActiveObjName, TYPE_STRING)
  RO_PROP_FN (kfpGetActiveRecord, GetActiveRecord, TYPE_INTERFACE)
  FN_2 (kfpGetSourceObject, TYPE_REFTARG, FPGetSourceObject, TYPE_bool, TYPE_REFTARG_TAB_BR)
virtual END_FUNCTION_MAP
FPInterfaceDesc
GetDesc ()

Static Public Member Functions

static bool  Is_IXRefObject8 (Animatable &animatable)
  Allows to determine whethe a scene entity implements this interface.
static IXRefObject8 GetInterface (InterfaceServer &is)
  Retrieves the IXRefObject8 interface from a scene entity.

Static Public Attributes

static FPInterfaceDesc  mFPInterfaceDesc

Protected Member Functions

virtual void  Init (const MaxSDK::AssetManagement::AssetUser &asset, const MSTR &oname, Object *ob, BOOL asProxy=FALSE)=0
virtual void  SetFile (const MaxSDK::AssetManagement::AssetUser &asset, BOOL proxy=FALSE, BOOL update=TRUE)=0
virtual void  SetObjName (MCHAR *name, BOOL proxy=FALSE)=0
virtual const
MaxSDK::AssetManagement::AssetUser
GetFile (BOOL proxy=FALSE) const =0
virtual MSTR  GetObjName (BOOL proxy=FALSE) const =0
virtual void  SetUseProxy (BOOL onOff, BOOL redraw=TRUE)=0
virtual void  SetRenderProxy (BOOL onOff)=0
virtual BOOL  GetUseProxy ()=0
virtual BOOL  GetRenderProxy ()=0
virtual const
MaxSDK::AssetManagement::AssetUser
GetCurFile () const =0
virtual const MSTR GetCurObjName () const =0

Member Enumeration Documentation

anonymous enum

Member Function Documentation

virtual const MaxSDK::AssetManagement::AssetUser& GetActiveFile ( ) const [pure virtual]

Retrieves the active source file.

The file currently used by the xref object could be the one where the source object comes from or the one where the proxy object comes from. Which file is currently used depends on the proxy settings of the xref object

Returns:
- The file asset currently used by the xref object.
See also:
IXRefProxy, IXRefItem
virtual const MCHAR* GetActiveObjName ( ) const [pure virtual]

Retrieves the active source item name.

The object name currently used by the xref object could be the source or the proxy object name. Which object name currently used depends on the proxy settings of the xref object.

Returns:
- Pointer to the name of the object currently xrefed or NULL if the name is not specified.
See also:
IXRefProxy, IXRefItem
virtual IObjXRefRecord* GetActiveRecord ( ) const [pure virtual]

Retrieves the active xref record this xref object belongs to.

When the proxy object assigned to this xref object is active, this method returns the xref record that owns the xref proxy. Otherwise it returns the xref record that owns the original xref item.

Returns:
The active xref record this xref object belongs to. A return value of NULL, indicates that the xref object is not part of an xref record yet.
virtual Object* GetSourceObject ( bool  resolveNested = false,
Tab< Modifier * > *  modifiers = NULL 
) const [pure virtual]

Retrieves the actual source object behind the XRef.

Parameters:
[in] resolveNested - When set to true, the method will recursively resolve any nested xref objects, guaranteeing that the one being returned is NOT an xref object. When set to false, the source object is returned without attempting to resolve nesting.
[in,out] modifiers - a pointer to a Tab<Modifier*> or NULL. If not NULL, the modifiers in the source object will be placed in the tab.
Returns:
The source object, or NULL if the xref is unresolved.
bool Is_IXRefObject8 ( Animatable animatable ) [inline, static]

Allows to determine whethe a scene entity implements this interface.

Parameters:
[in] animatable - Reference to scene entity
Returns:
- true if the scene entity implements the IXRefObject8 interface, false otherwise
                                                                {
    return ((animatable.SuperClassID() == SYSTEM_CLASS_ID) 
                    && (animatable.ClassID() == XREFOBJ_CLASS_ID));
}
static IXRefObject8* GetInterface ( InterfaceServer is ) [inline, static]

Retrieves the IXRefObject8 interface from a scene entity.

Parameters:
[in] is - Reference to scene entity
Returns:
- Pointer to the IXRefObject8 interface of the scene entity or NULL if it's not an xref object
                                                           {
        return static_cast<IXRefObject8*>(is.GetInterface(IID_XREF_OBJECT8));
    };
virtual Interface_ID GetID ( ) [inline, virtual]
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.

{ return IID_XREF_OBJECT8; }
BEGIN_FUNCTION_MAP RO_PROP_FN ( kfpGetActiveFileName  ,
FPGetActiveFileName  ,
TYPE_FILENAME   
)
RO_PROP_FN ( kfpGetActiveObjName  ,
GetActiveObjName  ,
TYPE_STRING   
)
RO_PROP_FN ( kfpGetActiveRecord  ,
GetActiveRecord  ,
TYPE_INTERFACE   
)
FN_2 ( kfpGetSourceObject  ,
TYPE_REFTARG  ,
FPGetSourceObject  ,
TYPE_bool  ,
TYPE_REFTARG_TAB_BR   
)
virtual END_FUNCTION_MAP FPInterfaceDesc* GetDesc ( ) [inline, virtual]
Remarks:
Returns a pointer to the class which contains the interface metadata.

Implements FPInterface.

{ return &mFPInterfaceDesc; }
virtual void Init ( const MaxSDK::AssetManagement::AssetUser asset,
const MSTR oname,
Object ob,
BOOL  asProxy = FALSE 
) [protected, pure virtual]
Remarks:
This method initializes a newly created XRef object. The caller provides the name of the file (fname), the name of the object in the file (oname), and a pointer to the object being XRefed (ob).
Parameters:
MSTR &fname

The file name is set to this string.

MSTR &oname

The object name is set to this string.

Object *ob

Points to the object being XRefed.

BOOL asProxy=FALSE

If TRUE then the above information is considered to specify the proxy portion of the XRef.

Implements IXRefObject.

virtual void SetFile ( const MaxSDK::AssetManagement::AssetUser asset,
BOOL  proxy = FALSE,
BOOL  update = TRUE 
) [protected, pure virtual]
Remarks:
Sets the Source or Proxy file depending on the value passed.
Parameters:
AssetUser &asset

The asset to set.

BOOL proxy=FALSE

TRUE to set the Proxy file name; FALSE for the XRef file name.

BOOL update=TRUE

TRUE to update the scene; FALSE to not update immediately.

Implements IXRefObject.

virtual void SetObjName ( MCHAR *  name,
BOOL  proxy = FALSE 
) [protected, pure virtual]
Remarks:
Sets the Object name or the Proxy name depending on the value passed.
Parameters:
MCHAR *name

The name to set.

BOOL proxy=FALSE

TRUE to set the Proxy name; FALSE to set the Object name.

Implements IXRefObject.

virtual const MaxSDK::AssetManagement::AssetUser& GetFile ( BOOL  proxy = FALSE ) const [protected, pure virtual]
Remarks:
Returns the File asset or the Proxy file asset depending on the value passed.
Parameters:
BOOL proxy=FALSE

TRUE to return the Proxy file asset; FALSE for the XRef file asset.

Implements IXRefObject.

virtual MSTR GetObjName ( BOOL  proxy = FALSE ) const [protected, pure virtual]
Remarks:
Returns the Object name or the Proxy name depending on the value passed.
Parameters:
BOOL proxy=FALSE

TRUE to return the Proxy name; FALSE to return the Object name.

Implements IXRefObject.

virtual void SetUseProxy ( BOOL  onOff,
BOOL  redraw = TRUE 
) [protected, pure virtual]
Remarks:
Sets the state of the Use Proxy choice and optionally redraws the viewports.
Parameters:
BOOL onOff

TRUE for on; FALSE for off.

BOOL redraw=TRUE

TRUE to redraw the viewports; otherwise FALSE.

Implements IXRefObject.

virtual void SetRenderProxy ( BOOL  onOff ) [protected, pure virtual]
Remarks:
Sets the state of the Render Proxy option.
Parameters:
BOOL onOff

TRUE for on; FALSE for off.

Implements IXRefObject.

virtual BOOL GetUseProxy ( ) [protected, pure virtual]
Remarks:
Returns TRUE if the Use Proxy option is on; otherwise FALSE.

Implements IXRefObject.

virtual BOOL GetRenderProxy ( ) [protected, pure virtual]
Remarks:
Returns TRUE if the Render Proxy option is on; otherwise FALSE.

Implements IXRefObject.

virtual const MaxSDK::AssetManagement::AssetUser& GetCurFile ( ) const [protected, pure virtual]
Remarks:
Returns the XRef File.

Implements IXRefObject.

virtual const MSTR& GetCurObjName ( ) const [protected, pure virtual]
Remarks:
Returns the XRef Object Name.

Implements IXRefObject.


Member Data Documentation


IXRefObject8 IXRefObject8 IXRefObject8 IXRefObject8 IXRefObject8 IXRefObject8 IXRefObject8 IXRefObject8 IXRefObject8 IXRefObject8
IXRefObject8 IXRefObject8 IXRefObject8 IXRefObject8 IXRefObject8 IXRefObject8 IXRefObject8 IXRefObject8 IXRefObject8 IXRefObject8