The methods listed below reflect the features of releases prior to 3ds Max 5.
TrackView was completely rewritten in 3ds Max 5.
For access to the new features, please look under Interface: trackviews
Properties
trackviews.isOpen <value>name or indexReturns a boolean value indicating if the specified trackview is open.
trackviews.isCurrent <value>name or indexReturns a boolean value indicating if the trackview is the last one used or not.
trackviews.setCurrent <value>name or indexSets the specified trackview to be the current one. Returns true if successful.
trackviews.currentTrackViewRead only property that returns the interface for the currently used trackview. Returns undefined if the trackview is closed.
trackviews.lastUsedTrackViewNameRead only property that returns the name of the current trackview.
trackviews.openLastUsedTrackView()Opens the current trackview if it has been closed.
trackviews.delete <value>name or indexDeletes the specified trackview.
trackviews.close <value>name or indexYou can now close a trackview based on it's index or name.
trackviews.open <value>name or indexYou can now open a trackview based on it's index or name.
trackviews.getTrackView <value>name or indexThis method will get a trackview based on it’s index or name.
EXAMPLE
showInterface (trackviews.getTrackView 1) trackviews.getAllTrackViews()The above script returns an array of trackviews.
trackviews.numTrackViews()Returns the number of trackviews.
trackviews.getTrackViewName <index>indexReturns the name of the trackview window based on the index.
<void>setName <string>nameSets the name of the trackview window
<integer>getNumTracks()Gets the number of tracks currently displayed in trackview
<integer>numSelTracks()Gets the number of selected tracks
<boolean>canAssignController()Tests to see if all selected tracks are of the same type
<void>assignControllerDialogInvokes the assign controller dialog if canAssignController()
<boolean>assignController <maxObject>controllerAssigns the controller to the selected tracks if canAssignController() is true and the controller is the appropriate type
<void>showControllerTypes <boolean>stateSets the ShowControllerType property
<void>expandTracks()Expands all tracks
<void>zoomSelected()Zooms to the selected object's track
<void>zoomOnTrack <maxObject>parent <index>subNumZooms to the track defined by the parent and the subNum
<maxObject>getTrack <index>indexReturns the object belonging to the indexed track
<maxObject>getParent <index>indexGets the parent of the object belonging to the index track. If the object is a position controller, the parent is the Transform controller
<maxObject>getSelected <index>indexGets the objects belonging to the selected, indexed track
<maxObject>getParentOfSelected <index>indexGets the indexed selected tracks parent object
<index>getSelectedSubNum <index>indexGets the subNum of the selected track
<index>getIndex <maxObject>objectGets the index for the animatable object
<boolean>selectTrackByIndex <index>index <boolean>clearSelectionSelects tracks by index
<boolean>selectTrack <maxObject>object <boolean>clearSelectionSelects tracks by object
A trackview interface can be obtained for one of the currently open trackviews using one of the following methods.
trackviews.getTrackViewByName <name as string>trackviews.getTrackViewByIndex <index as int>trackviews.getAllTrackViews()Once you have an instance of the trackview interface you can call the following new methods on it.
getEditMode()Gets the current edit mode as an symbolic enum.
setEditMode <type as symbolic enum>Sets the current edit mode
editModeProperty to do the same as the above two methods
Valid symbolic enum values are:
#editKeys #editTime #editFCurves #editRanges #positionRanges