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:
<trackbar_Interface>.visible : boolean : Read|Write
Displays or hides the trackbar
<trackbar_Interface>.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
<trackbar_Interface>.keyTransparency : integer : Read|Write
Sets/gets the key transparency value. Acceptable values range 0-255
<trackbar_Interface>.selKeyTransparency : integer : Read|Write
Sets/gets the selected key transparency value. Acceptable values range 0-255
<trackbar_Interface>.cursorTransparency : integer : Read|Write
Sets/gets the cursor transparency value. Acceptable values range 0-255
<trackbar_Interface>.affectChildren : boolean : Read|Write
Sets/gets the affect children mode.
The following properties require a redraw, but in some cases hiding and unhiding the trackbar gives a better result.
<trackbar_Interface>.showAudio : boolean : Read|Write
Sets/gets whether or not the audio track is displayed in the trackbar
<trackbar_Interface>.showFrames : boolean : Read|Write
Sets/gets whether or not frames are displayed in the trackbar
<trackbar_Interface>.showSelectionRange : boolean : Read|Write
Sets/gets whether or not selection ranges are displayed in the trackbar
<trackbar_Interface>.showSnapToFrames : boolean : 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><trackbar_Interface>.redraw forceRedraw:<boolean>
forceRedraw: default value: false
Redraws the trackbar. If forceRedraw is set to true, the redraw will be forced.
<time><trackbar_Interface>.getNextKeyTime()
Gets the next key time. The "at time" context can be used to determine the starting point.
<time><trackbar_Interface>.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><trackbar_Interface>.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 thetrack 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.
Either callbackFunction argument to TrackBar.RegisterFiltercan 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><trackbar_Interface>.unRegisterFilter <index>index
Unregister the indexed filter function.
<integer><trackbar_Interface>.filterCount()
Returns the number of registered filter functions.
<int by value array><trackbar_Interface>.getFilterID <index>index
Returns the filter id of the indexed filter function.
<stringby value><trackbar_Interface>.getFilterName <index>index
Returns the name of the indexed filter function as a string.
<boolean><trackbar_Interface>.isFilterActive <index>index
Returns true if the indexed filter is active, false otherwise.
<void><trackbar_Interface>.setFilterActive <index>index <boolean>state
Sets the active state of the indexed filter to the supplied Boolean value.