Class ITrackBar

3DS Max Plug-In SDK

Class ITrackBar

See Also: Class IKeyControl, Class Interface.

class ITrackBar

Description:

This class is available in release 3.0 and later only.

The track bar offers a quick way to manipulate keyframes for selected objects. Keys are displayed on the track bar just like they are in Track View. Developers are able to manipulate the track bar using this class. There is a method of class Interface which returns a pointer to an instance of this class:

ITrackBar* GetTrackBar().

All methods of this class are Implemented by the System.

Methods:

public:

Prototype:

virtual void SetVisible(BOOL bVisible) = 0;

Remarks:

Sets the visibility of the track bar to on or off.

Parameters:

BOOL bVisible

TRUE to make visible; FALSE to hide.

Prototype:

virtual BOOL IsVisible() = 0;

Remarks:

Returns TRUE if the track bar is visible; otherwise FALSE.

Prototype:

virtual void SetFilter(UINT nFilter) = 0;

Remarks:

The track bar shows keys for all parametric animation as well as transforms. This method sets the filter used which determines which keys are shown in the track bar.

Parameters:

UINT nFilter

One of the following values:

TRACKBAR_FILTER_ALL

Specifies to show all keys.

TRACKBAR_FILTER_TMONLY

Specifies to show transform keys only.

TRACKBAR_FILTER_CURRENTTM

Specifies to only show keys for the currently active transform (move, rotate or scale).

TRACKBAR_FILTER_OBJECT

Specifies to show keys for the controllers assigned anywhere in the pipeline to be included in the TrackBar key-display. This is essentially the modifiers and the base objects for the selected nodes (no transforms or materials).

TRACKBAR_FILTER_MATERIAL

Specifies to show keys for the controllers assigned anywhere for the selected nodes material - all controllers in the whole material tree will be included in the track bar display.

Prototype:

virtual UINT GetFilter() = 0;

Remarks:

Returns the filter value which determines which keys are shown in the track bar. See the list specified in the method above for details.

Prototype:

virtual TimeValue GetNextKey(TimeValue tStart, BOOL bForward) = 0;

Remarks:

This method returns the time of the next key given a start time and a flag which indicates if the search should proceed forward or backwards. This is similar to the behavior of Animatable::GetNextKeyTime().

Parameters:

TimeValue tStart

Specifies the time to start looking for the next key.

BOOL bForward

TRUE to return the time of the next key; FALSE for the previous key.

Return Value:

The time of the next (or previous) key.

Prototype:

virtual void RedrawTrackBar(bool bForce = false) = 0;

Remarks:

This method is available in release 4.0 and later only.

Redraws the Track Bar if required an optionally forces a redraw (even if not known to be required).

Parameters:

bool bForce = false

Pass true to force a redraw; false to only redraw if 3ds max deems it required.

Prototype:

virtual void SetShowFrames(bool b) = 0;

Remarks:

This method is available in release 4.0 and later only.

Controls the visibility of frame numbers in the Track Bar.

Parameters:

bool b

Pass true to show frame numbers; false to turn them off.

Prototype:

virtual bool GetShowFrames() = 0;

Remarks:

This method is available in release 4.0 and later only.

Returns true if frame numbers are visible in the Track Bar; false if not.

Prototype:

virtual void SetShowAudio(bool b) = 0;

Remarks:

This method is available in release 4.0 and later only.

Controls the visibility of the audio track.

Parameters:

bool b

Pass true to show the audio track; false to turn it off.

Prototype:

virtual bool GetShowAudio() = 0;

Remarks:

This method is available in release 4.0 and later only.

Returns true if the audio track is displayed; false if it is not.

Prototype:

virtual void SetShowSelectionRange(bool b) = 0;

Remarks:

This method is available in release 4.0 and later only.

Controls if the selection range bar is visible or not.

Parameters:

bool b

Pass true to display the selection range bar; false to turn it off.

Prototype:

virtual bool GetShowSelectionRange() = 0;

Remarks:

This method is available in release 4.0 and later only.

Returns true if the selection range bar is visible; false if it is not.

Prototype:

virtual void SetSnapToFrames(bool b) = 0;

Remarks:

This method is available in release 4.0 and later only.

Controls the snap to frames setting.

Parameters:

bool b

Pass true to turn it on; false to turn it off.

Prototype:

virtual bool GetSnapToFrames() = 0;

Remarks:

This method is available in release 4.0 and later only.

Returns true if snap to frames is on; false if it is off.

Prototype:

virtual void SetKeyTransparency(int xp) = 0;

Remarks:

This method is available in release 4.0 and later only.

This method allows you to set the transparency of keyframes displayed in the trackbar.

Parameters:

int xp

The transparency value between 0 and 255.

Prototype:

virtual int GetKeyTransparency() = 0;

Remarks:

This method is available in release 4.0 and later only.

This method returns the transparency of keyframes displayed in the trackbar.

Return Value:

The transparency value between 0 and 255.

Prototype:

virtual void SetSelKeyTransparency(int xp) = 0;

Remarks:

This method is available in release 4.0 and later only.

This method allows you to set the transparency of selected keyframes displayed in the trackbar.

Parameters:

int xp

The transparency value between 0 and 255.

Prototype:

virtual int GetSelKeyTransparency() = 0;

Remarks:

This method is available in release 4.0 and later only.

This method returns the transparency of selected keyframes displayed in the trackbar.

Return Value:

The transparency value between 0 and 255.

Prototype:

virtual void SetCursorTransparency(int xp) = 0;

Remarks:

This method is available in release 4.0 and later only.

This method allows you to set the transparency of the cursor displayed in the trackbar.

Parameters:

int xp

The transparency value between 0 and 255.

Prototype:

virtual int GetCursorTransparency() = 0;

Remarks:

This method is available in release 4.0 and later only.

This method returns the transparency of the cursor displayed in the trackbar.

Return Value:

The transparency value between 0 and 255.