- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hey there, I have a question about how to use the selectTrack function in Track View Curve Editor to automatically select the desired animation track through maxscript.
Simple example - let's say I have a box created by the following code:
Box pos:[0,0,0] length:10 width:10 height:10 name: "First_Box"
$Box:First_Box @ [0.000000,0.000000,0.000000]
I want to create a curve editor trackview window named "Rotation Trackview" and open it in a window, which is accomplished with the following:
sCurveName = "Rotation Trackview"
"Rotation Trackview"
nCurve = trackviews.gettrackview sCurveName
I am now trying to use the selectTrack command to select the X rotation track automatically.
This will be helpful because the final project has many objects that need only be animated by one parameter.
However, I am getting the following error:
nCurve.selectTrack First_Box.rotation.controller.x_rotation
-- Argument count error: selectTrack wanted 2, got 1
-- MAXScript callstack:
-- thread data: threadID:25804
-- ------------------------------------------------------
-- [stack level: 0]
-- In top-level
nCurve.selectTrack First_Box.rotation.controller.x_rotation true
-- Runtime error: Attempt to access deleted scene object
-- MAXScript callstack:
-- thread data: threadID:25804
-- ------------------------------------------------------
-- [stack level: 0]
-- In top-level
Can someone explain how to use the selectTrack command properly in this example? The idea will be to be able to force the selection in the trackview window when the script is run.
Thank you!
Solved! Go to Solution.