Class IXRefObject
See Also: Class Object, Class INode.
class IXRefObject: public Object
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()==Class_ID(XREFOBJ_CLASS_ID,0)) {
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.
Methods:
public:
Prototype:
virtual void Init(TSTR &fname, TSTR &oname, Object *ob, BOOL asProxy=FALSE)=0;
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:
TSTR &fname
The file name is set to this string.
TSTR &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.
Prototype:
virtual void SetFileName(TCHAR *name, BOOL proxy=FALSE, BOOL update=TRUE)=0;
Remarks:
Sets the File name or the Proxy file name depending on the value passed.
Parameters:
TCHAR *name
The name 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.
Prototype:
virtual void SetObjName(TCHAR *name, BOOL proxy=FALSE)=0;
Remarks:
Sets the Object name or the Proxy name depending on the value passed.
Parameters:
TCHAR *name
The name to set.
BOOL proxy=FALSE
TRUE to set the Proxy name; FALSE to set the Object name.
Prototype:
virtual void SetUseProxy(BOOL onOff,BOOL redraw=TRUE)=0;
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.
Prototype:
virtual void SetRenderProxy(BOOL onOff)=0;
Remarks:
Sets the state of the Render Proxy option.
Parameters:
BOOL onOff
TRUE for on; FALSE for off.
Prototype:
virtual void SetUpdateMats(BOOL onOff)=0;
Remarks:
Sets the state of the Update Materials option.
Parameters:
BOOL onOff
TRUE for on; FALSE for off.
Prototype:
virtual void SetIgnoreAnim(BOOL onOff,BOOL redraw=TRUE)=0;
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.
Prototype:
virtual TSTR GetFileName(BOOL proxy=FALSE)=0;
Remarks:
Returns the File name or the Proxy file name depending on the value passed.
Parameters:
BOOL proxy=FALSE
TRUE to return the Proxy file name; FALSE for the XRef file name.
Prototype:
virtual TSTR GetObjName(BOOL proxy=FALSE)=0;
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.
Prototype:
virtual TSTR &GetCurFileName()=0;
Remarks:
Returns the XRef File Name.
Prototype:
virtual TSTR &GetCurObjName()=0;
Remarks:
Returns the XRef Object Name.
Prototype:
virtual BOOL GetUseProxy()=0;
Remarks:
Returns TRUE if the Use Proxy option is on; otherwise FALSE.
Prototype:
virtual BOOL GetRenderProxy()=0;
Remarks:
Returns TRUE if the Render Proxy option is on; otherwise FALSE.
Prototype:
virtual BOOL GetUpdateMats()=0;
Remarks:
Returns TRUE if the Update Material option is on; otherwise FALSE.
Prototype:
virtual BOOL GetIgnoreAnim()=0;
Remarks:
Returns TRUE if the Ignore Animation option is on; otherwise FALSE.
Prototype:
virtual void BrowseObject(BOOL proxy)=0;
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.
Prototype:
virtual void BrowseFile(BOOL proxy)=0;
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.
Prototype:
virtual void ReloadXRef()=0;
Remarks:
Reloads this Object XRef.