Class ITVUtility

3DS Max Plug-In SDK

Class ITVUtility

See Also: Class Animatable, Class TrackViewUtility, Class Interval, Class Interface, Class Control.

class ITVUtility

Description:

This class is an interface that is given to track view utilities that allows them to access the track view they were launched from. All methods of this class are implemented by the system.

Methods:

Prototype:

virtual int GetNumTracks()=0;

Remarks:

Returns the total number of visible (open) tracks in Track View. This determines valid values to use for 'i' in the methods below.

Prototype:

virtual Animatable *GetAnim(int i)=0;

Remarks:

Returns a pointer to the Animatalbe for the 'i-th' track.

Parameters:

int i

Specifies the track.

Prototype:

virtual Animatable *GetClient(int i)=0;

Remarks:

Returns a pointer to the client of the 'i-th' track. This is the 'parent' or 'owner' of the 'i-th' item.

Parameters:

int i

Specifies the track.

Prototype:

virtual int GetSubNum(int i)=0;

Remarks:

Returns the sub-anim number of the 'i-th' track.

Parameters:

int i

Specifies the track.

Prototype:

virtual TSTR GetTrackName(int i)=0;

Remarks:

Returns the name of the 'i-th' track.

Parameters:

int i

The index of the track whose name is returned.

Prototype:

virtual BOOL IsSelected(int i)=0;

Remarks:

Returns TRUE if the 'i-th' track is selected; otherwise FALSE.

Parameters:

int i

The index of the track to test.

Prototype:

virtual void SetSelect(int i,BOOL sel)=0;

Remarks:

Sets the selected state of the 'i-th' track to the state passed.

Parameters:

int i

The index of the track whose selected state is set.

BOOL sel

Specifies the selected state. TRUE for selected; FALSE for not selected.

Prototype:

virtual HWND GetTrackViewHWnd()=0;

Remarks:

Returns the windows handle of the main Track View window.

Prototype:

virtual int GetMajorMode()=0;

Remarks:

Returns a value to indicate the current mode Track View is operating in. This is one of five modes.

Return Value:

One of the following values:

TVMODE_EDITKEYS

TVMODE_EDITTIME

TVMODE_EDITRANGES

TVMODE_POSRANGES

TVMODE_EDITFCURVE

Prototype:

virtual Interval GetTimeSelection()=0;

Remarks:

Returns the current interval of selected time.

Prototype:

virtual BOOL SubTreeMode()=0;

Remarks:

Returns TRUE if 'Modify Subtree' mode is active; otherwise FALSE.

Prototype:

virtual Animatable *GetTVRoot()=0;

Remarks:

Returns a pointer to the Track View Root.

Prototype:

virtual void TVUtilClosing(TrackViewUtility *util)=0;

Remarks:

This must be called when a track view utility is closing so that it can be unregistered from notifications

Parameters:

TrackViewUtility *util

Points to the utility that is closing. This is usually called by passing the this pointer as in: TVUtilClosing(this);