Public Member Functions

IXRefObject Class Reference

Search for all occurrences

Detailed Description

Legacy interface for xref objects.

Note:In 3ds Max 8 this class was replaced with class IXrefObject8. It is still documented for backwards compatibility.

See also:
Class Object, Class INode.

Description:
This class is available in release 3.0 and later only.

This class is an interface to the parameters of an XRef object. Object XRefs are derived from this class.

If you have an object pointer you can check its super class ID and class ID to see if it is an XRef object. Then you can cast it to an instance of this class and call these methods. For example:
INode *node = ip->GetSelNode(0);
Object *obj = node->GetObjectRef();

if (obj->SuperClassID()==SYSTEM_CLASS_ID && obj->ClassID()==XREFOBJ_CLASS_ID)
{
   IXRefObject *ix = (IXRefObject *)obj;
   ix->BrowseFile(FALSE);
}
However you may have an object that depends on an XRef object (for example a Boolean with an XRef object as one of it's operands) or you may have a pointer to the object that the XRef object references. In such cases the only way to know for sure is to look up and down the pipeline for XRef objects.

#include <iXrefObj.h>

Inheritance diagram for IXRefObject:
Inheritance graph
[legend]

List of all members.

Public Member Functions

Class_ID  ClassID ()
  Retrieves a constant that uniquely identifies the plugin class.
SClass_ID  SuperClassID ()
  Retrieves a constant representing the type of the plugin.
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 void  SetUseProxy (BOOL onOff, BOOL redraw=TRUE)=0
virtual void  SetRenderProxy (BOOL onOff)=0
virtual void  SetUpdateMats (BOOL onOff)=0
virtual void  SetIgnoreAnim (BOOL onOff, BOOL redraw=TRUE)=0
virtual const
MaxSDK::AssetManagement::AssetUser
GetFile (BOOL proxy=FALSE) const =0
virtual MSTR  GetObjName (BOOL proxy=FALSE) const =0
virtual const
MaxSDK::AssetManagement::AssetUser
GetCurFile () const =0
virtual void  SetCurFile (const MaxSDK::AssetManagement::AssetUser &)=0
virtual const MSTR GetCurObjName () const =0
virtual void  SetCurObjName (const MCHAR *name)=0
virtual BOOL  GetUseProxy ()=0
virtual BOOL  GetRenderProxy ()=0
virtual BOOL  GetUpdateMats ()=0
virtual BOOL  GetIgnoreAnim ()=0
virtual void  BrowseObject (BOOL proxy)=0
virtual void  BrowseFile (BOOL proxy)=0
virtual void  ReloadXRef ()=0

Member Function Documentation

Class_ID ClassID ( ) [inline, virtual]

Retrieves a constant that uniquely identifies the plugin class.

This method must return the unique ID for the plugin class. If two ClassIDs conflict, the system will only load the first conflicting one it finds. A program (gencid.exe) is provided to generate unique class id values.

Returns:
A class id that uniquely identifies a plugin class
See also:
Class ClassID, List of Class IDs.

Reimplemented from Animatable.

{return XREFOBJ_CLASS_ID;}
SClass_ID SuperClassID ( ) [inline, virtual]

Retrieves a constant representing the type of the plugin.

Returns:
A super class id that uniquely identifies the type (category) of the plugin. Note that several plugin classes can be of the same type, thus return the same super class id. Plugins are uniquely identified by their class ids. List of Super Class IDs.
See also:
SClass_ID

Reimplemented from ReferenceTarget.

{return SYSTEM_CLASS_ID;}
virtual void Init ( const MaxSDK::AssetManagement::AssetUser asset,
const MSTR oname,
Object ob,
BOOL  asProxy = FALSE 
) [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.

Implemented in IXRefObject8.

virtual void SetFile ( const MaxSDK::AssetManagement::AssetUser asset,
BOOL  proxy = FALSE,
BOOL  update = TRUE 
) [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.

Implemented in IXRefObject8.

virtual void SetObjName ( MCHAR *  name,
BOOL  proxy = FALSE 
) [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.

Implemented in IXRefObject8.

virtual void SetUseProxy ( BOOL  onOff,
BOOL  redraw = TRUE 
) [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.

Implemented in IXRefObject8.

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

TRUE for on; FALSE for off.

Implemented in IXRefObject8.

virtual void SetUpdateMats ( BOOL  onOff ) [pure virtual]
Remarks:
Sets the state of the Update Materials option.
Parameters:
BOOL onOff

TRUE for on; FALSE for off.
virtual void SetIgnoreAnim ( BOOL  onOff,
BOOL  redraw = TRUE 
) [pure virtual]
Remarks:
Sets the state of the Ignore Animation 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.
virtual const MaxSDK::AssetManagement::AssetUser& GetFile ( BOOL  proxy = FALSE ) const [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.

Implemented in IXRefObject8.

virtual MSTR GetObjName ( BOOL  proxy = FALSE ) const [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.

Implemented in IXRefObject8.

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

Implemented in IXRefObject8.

virtual void SetCurFile ( const MaxSDK::AssetManagement::AssetUser ) [pure virtual]
Remarks:
Sets the XRef File.
virtual const MSTR& GetCurObjName ( ) const [pure virtual]
Remarks:
Returns the XRef Object Name.

Implemented in IXRefObject8.

virtual void SetCurObjName ( const MCHAR *  name ) [pure virtual]
Remarks:
Sets the XRef Object Name.
virtual BOOL GetUseProxy ( ) [pure virtual]
Remarks:
Returns TRUE if the Use Proxy option is on; otherwise FALSE.

Implemented in IXRefObject8.

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

Implemented in IXRefObject8.

virtual BOOL GetUpdateMats ( ) [pure virtual]
Remarks:
Returns TRUE if the Update Material option is on; otherwise FALSE.
virtual BOOL GetIgnoreAnim ( ) [pure virtual]
Remarks:
Returns TRUE if the Ignore Animation option is on; otherwise FALSE.
virtual void BrowseObject ( BOOL  proxy ) [pure virtual]
Remarks:
This method brings up the browse object (Merge) dialog.
Parameters:
BOOL proxy

TRUE to have Use Proxy mode active; FALSE to have it inactive.
virtual void BrowseFile ( BOOL  proxy ) [pure virtual]
Remarks:
This method brings up the browse file (Open File) dialog.
Parameters:
BOOL proxy

TRUE to have Use Proxy mode active; FALSE to have it inactive.
virtual void ReloadXRef ( ) [pure virtual]
Remarks:
Reloads this Object XRef.

IXRefObject IXRefObject IXRefObject IXRefObject IXRefObject IXRefObject IXRefObject IXRefObject IXRefObject IXRefObject
IXRefObject IXRefObject IXRefObject IXRefObject IXRefObject IXRefObject IXRefObject IXRefObject IXRefObject IXRefObject