Notifications
Clear all

[Closed] Hide Track View

Hi all,

I’m new to MaxScript.

I want to create a shortcut to show/hide the track view.

For some reason it takes a while to open/close the Mini Curve Editor (Toggle Trackbar), so I want to create a shortcut to show/hide the track view. I’ve already managed to create a script which opens/closes the Mini Curve Editor (Toggle Trackbar) including the time slider (Show Time Slider) and track bar (Show Track Bar Toggle). Well the MaxScript Listener was a great help here

OpenTrackView:
[size=1]macros.run “Track View”“Maximize_Trackbar”[/size]
[size=1]actionMan.executeAction 0 “407”[/size]
[size=1]macros.run “Customize User Interface”“UI_TimeSlider_Toggle”[/size]
[size=1]
[/size]
[size=2]CloseTrackView:
[/size]macros.run “Customize User Interface” “UI_TimeSlider_Toggle”
actionMan.executeAction 0 “407”
macros.run “Track View”“Maximize_Trackbar”

[size=2]Anyway, this way is not the fastest. It’s much faster to show/hide the track view. But there seems to be no function to hide the track view. You can do this when you right-click the track view menu bar and choose hide (there is also dock and float). There is no time delay when doing this, opposed to the Mini Curve Editor. In the MaxScript Reference I’ve found the function for dock [#bottom] and close but I didn’t manage to create the script.[/size]
[size=2][/size]
[size=2]Can you help me?
[/size]

4 Replies

Check out the Track View and Interface:trackViews topics in the maxscript manual. You should find everything you need there.

Many thanks, though I already reviewed the track view commands. But I was not sure if I’m right.

Well I finally managed to create the script. It’s really easy.

Open Track View (this will dock the track view to the bottom, just the way I want it):

trackviews.open “Curve Editor” layoutName:“mytrackviewlayout” pos:[6,100] width:800 height:300 dock:#bottom

Close Track View:

trackviews.close “Curve Editor”

[size=2]This needs two buttons or shortcuts. Is there a way to merge this to one single script which does open/close each time I evaluate it?[/size]
[size=2][/size]
[size=2]Is there no way to access the “Hide” command (right-click track view menu -> Hide)?
[/size]

YEEHAAA I’m becoming the MaxScript king!

Here’s the script:

if trackviews.isOpen “Curve Editor”

then trackviews.close “Curve Editor”

else trackviews.open “Curve Editor” layoutName:“Gregor” height:300 dock:#bottom

MaxScript is fun, surprisingly!

Edit:
But hey, why didn’t discreet/Autodesk implement that?

I had to modify the script a bit because it did not work if you have no saved track views (for example when you start Max). So finally here it is:

macroScript OpenCloseTrackView

category:“MyScripts”

toolTip:””

(

if trackviews.numTrackViews() == 0

then trackviews.open “Curve Editor” layoutName:“Gregor” height:300 dock:#bottom

else

if trackviews.isOpen “Curve Editor”

then trackviews.close “Curve Editor”

else trackviews.open “Curve Editor” layoutName:“Gregor” height:300 dock:#bottom

)

[size=1][/size]