ScriptSpot home

Forum topic · General Scripting

deleteNoteTrack

By Henrard Stephane · 2012-01-20

Description

Hello,

I'm new on this website.

I have a question about the script below :

(
while (numNoteTRacks TrackViewNodes.Max_MotionClip_Manager > 0) do deleteNoteTrack TrackViewNodes.Max_MotionClip_Manager (getNoteTrack TrackViewNodes.Max_MotionClip_Manager 1)
)

When I use this script to clean the NoteTrack sometime I get the message:

"-- Unknow property: "Max_MotionClip_Manager" in TrackviewNode:root"

Does anyone know how can I change this script to don't get this message ?

Thanks you for your help

Comments (2)

Comment policy

Henrard Stephane

Thank you very much

Hello Anubis,

Thanks you for your help !

It's exactly what i was looking for :-)

Panayot Karabakalov

fix

add this line of code at the beginning of the script:

trackViewNodes[5]

this little magic fix an old Max bug,
after it Max remember Max_MotionClip_Manager :)

or if you like to put this in function:

fn deleteNoteTracks = (
	mcMan = TrackViewNodes[5]
	while (numNoteTRacks mcMan > 0) do
	deleteNoteTrack mcMan (getNoteTrack mcMan 1)
)