Class IXTCAccess

3DS Max Plug-In SDK

Class IXTCAccess

See Also: Class Object, Class XTCObject

class IXTCAccess

Description:

This class is available in release 4.0 and later only.

This class provides an interface to access Extension Channels.

Methods:

public:

Prototype:

virtual Interface_ID GetID();

Remarks:

This method returns the IXTCAccess interface ID.

Default Implementation:

{ return IXTCACCESS_INTERFACE_ID; }

Prototype:

virtual LifetimeType LifetimeControl();

Remarks:

This method allows enquiries into the actual lifetime policy of a client and provide a server-controlled delete notify callback.

Return Value:

One of the following LifetimeTypes:

noRelease

Do not call release, use interface as long as you like.

immediateRelease

The interface is only good for one calls. The release is implied so a call to release is not required.

wantsRelease

The clients are controlling the lifetime, so the interface needs a Release() when the client has finished. This is the default.

serverControlled

The server controls the lifetime and will use the InterfaceNotifyCallback to inform the code when it is gone.

Default Implementation:

{ return noRelease; }

Prototype:

virtual void AddXTCObject(XTCObject *pObj, int priority = 0, int branchID = -1)=0;

Remarks:

This method adds an extension object into the pipeline.

Parameters:

XTCObject *pObj

The extension object you wish to add.

int priority = 0

The priority to set.

int branchID = -1

The branch identifier to set.

Prototype:

virtual int NumXTCObjects()=0;

Remarks:

This method returns the number of extension objects.

 

Prototype:

virtual XTCObject *GetXTCObject(int index)=0;

Remarks:

This method returns the I-th extension object.

Parameters:

int index

The index of the extension object to return.

Prototype:

virtual void RemoveXTCObject(int index)=0;

Remarks:

This method allows you to remove the I-th extension object.

Parameters:

int index

The index of the extension object you wish to remove.

Prototype:

virtual void SetXTCObjectPriority(int index,int priority)=0;

Remarks:

This method allows you to set the priority for the I-th extension object.

Parameters:

int index

The index of the extension object for which to set the priority.

int priority

The priority to set.

Prototype:

virtual int GetXTCObjectPriority(int index)=0;

Remarks:

This method returns the priority for the I-th extension object.

Parameters:

int index

The index of the extension object.

Prototype:

virtual void SetXTCObjectBranchID(int index,int branchID)=0;

Remarks:

This method allows you to set the branch identifier for the I-th extension object.

Parameters:

int index

The index of the extension object.

int branchID

The branch identifier to set.

Prototype:

virtual int GetXTCObjectBranchID(int index)=0;

Remarks:

This method returns the branch identifier for the I-th extension object.

Parameters:

int index

The index of the extension object.

Prototype:

virtual void MergeAdditionalChannels(Object *from, int branchID)=0;

Remarks:

This method has to be called whenever the CompoundObject updates a branch (calling Eval on it). Object *from is the object returned from Eval (os.obj); branchID is an int, that specifies that branch. The extension channel will get a callback to RemoveXTCObjectOnMergeBranches() and MergeXTCObject(). By default it returns true to RemoveXTCObjectOnMergeBranches(), which means, that the existing XTCObjects with that branchID will be deleted. The method MergeXTCObject() simply copies the XTCObjects from the incoming branch into the compound object.

Parameters:

Object *from

The object from which to merge additional channels

int branchID

The branch identifier.

Prototype:

virtual void BranchDeleted(int branchID, bool reorderChannels)=0;

Remarks:

This method has to be called on the CompoundObject, so it can delete the XTCObjects for the specific branch. The XTCObject will have again the final decision if the XTCObject gets really deleted or not in a callback to RemoveXTCObjectOnBranchDeleted(), which will return true, if the XTCObject should be removed.

Parameters:

int branchID

The branch identifier.

bool reorderChannels

TRUE to reorder the channels, otherwise FALSE.

Prototype:

virtual void CopyAdditionalChannels(Object *from, bool deleteOld = true, bool bShallowCopy = false)=0;

Remarks:

This method copies all extension objects from the "from" objects into the current object. In case deleteOld is false, the objects will be appended. In case it is true, the old XTCObjects will be deleted.

Parameters:

Object *from

The object to copy from.

bool deleteOld = true

TRUE to delete the old channel, FALSE to append the channels.

bool bShallowCopy = false

TRUE to create a shallow copy, FALSE to create a deep copy.

Prototype:

virtual void DeleteAllAdditionalChannels()=0;

Remarks:

This method allows you to delete all additional channels.