Trackbar Interface

The Trackbar Interface provides access to properties and methods of the trackbar. The trackbar interface can be retrieved using a function or property in maxOps interface :

trackBar_Interface = maxOps.trackBar

or

trackBar_Interface = maxOps.getTrackBar()

Mixin Interface: (maxOps.trackbar)

Interface: trackbar

Properties:

.visible : boolean : Read|Write

Displays or hides the trackbar

.filter : enum : Read|Write

filter enums: {#all|#TMOnly|#currentTM|#cbject|#mat}

Sets and gets the filter that determines which keys are displayed in the trackbar

.keyTransparency : integer : Read|Write

Sets/gets the key transparency value. Acceptable values range 0-255

.selKeyTransparency : integer : Read|Write

Sets/gets the selected key transparency value. Acceptable values range 0-255

.cursorTransparency : integer : Read|Write

Sets/gets the cursor transparency value. Acceptable values range 0-255

.affectChildren : boolean : Read|Write

Sets/gets the affect children mode.

Note:

The following properties require a redraw, but in some cases hiding and unhiding the trackbar gives a better result.

.showAudio : bool : Read|Write

Sets/gets whether or not the audio track is displayed in the trackbar

.showFrames : bool : Read|Write

Sets/gets whether or not frames are displayed in the trackbar

.showSelectionRange : bool : Read|Write

Sets/gets whether or not selection ranges are displayed in the trackbar

.showSnapToFrames : bool : Read|Write

Sets/gets whether or not keys are snapped to frames when moved

Example:

tbar = maxops.trackbar

tbar.showframes = false

tbar.redraw() -- Notice the result so far

tbar.visible = false

tbar.visible = true -- Notice the difference

Methods:

<void>redraw forceRedraw:<bool>

forceRedraw default value: false

Redraws the trackbar. If forceRedraw is set to true, the redraw will be forced.

<time>getNextKeyTime()

Gets the next key time. The "at time" context can be used to determine the starting point.

<time>getPreviousKeyTime()

Gets the previous key time. The "at time" context can be used to determine the starting point.

The following methods for Registering and Managing of Trackbar Key Filters were added to the interface in 3ds Max 7:

 

<index>registerFilter <value>callbackFilterFunction <value>callbackAdditionFunction <string>name <integer>id active:<boolean> stopTraversal:<boolean> active default value: false stopTraversal default value: true

Register a trackbar filter callback function.

The callbackFilterFunction is a MAXScript function which should expect 5 arguments in the form:

fn myCallbackFilterFunction theAnimatable theParent theSubAnimIndex theGrandParent theNode = (...)

theAnimatable: The first argument passed to the function will be the track whose controller's keys are to be filtered.

theParent: The second argument passed to the function will be the parent track of the track to be filtered.

theSubAnimIndex: The third argument passed to the function will be the sub-anim index of theAnimatable track inside theParent track,

theGrandParent: This fourth argument passed to the function will be the parent of theSubAnimIndex track. It is provided as an additional layer that is needed in case theParent argument is a ParamBlock2 or similar. For example, you may need to know that theGrandParent is a Bend Modifier and theSubAnimIndex is an index into the ParamBlock storage unit.

theNode: The fifth and last argument passed to the function will be the originating scene node whose subAnims are being traversed.

Note:

Either callbackFunction argument to TrackBar.RegisterFilter can be the value 'undefined'.

 

For a detailed explanation of the way the function is called and used, please see Exploring the Trackbar Filter Callback Functions

For sample filter functions, please see Trackbar Filter Callback Function Examples

 

<void>unRegisterFilter <index>index

Unregister the indexed filter function.

<integer>filterCount()

Returns the number of registered filter functions.

<int by value array>getFilterID <index>index

Returns the filter id of the indexed filter function.

<string by value>getFilterName <index>index

Returns the name of the indexed filter function as a string.

<boolean>isFilterActive <index>index

Returns true if the indexed filter is active, false otherwise.

<void>setFilterActive <index>index <bool>state

Sets the active state of the indexed filter to the supplied Boolean value.

 

See also

Interface: maxOps

Exploring the Trackbar Filter Callback Functions

Trackbar Filter Callback Function Examples