Notifications
Clear all

[Closed] track needs activating before I can place keys on it

hi guys,

I’m using a plugin exporter for the TorqueEngine, and I’m trying to use it via maxscript

for the most part it works, but I’m having a weird issue :

I’ve used the macrorecorder to capture the creation of the object AND the creation of keys in the TrackView

I get this:

 
 
Sequence Sequence_Begin_End:off pos:[2.10911,-18.9042,0] isSelected:on
 
macros.run "Track View" "LaunchDopeSheetEditor" 
 
$.Sequence_Begin_End = off
 
addNewKey $.Sequence_Begin_End.controller 0f #select
 
addNewKey $.Sequence_Begin_End.controller 5f #select
 

obviosly this creates the sequence object, and then adds keys to frame 1 and 5

ok so far… but,

when I run the above block It doesn’t create the keys, instead, I get an undefined message:

 -- No ""addNewKey"" function for undefined

Ok, annoyying, but now it gets even weirder…

After I create a key in TrackView manually, THEN I can use the addNewKey command above, and keys are created just fine

I’ve experimented with this alot but I can’t seem to get it to work…it’s almost like I need to activate the track (by creating a key in it) before I can have access to it via maxscript…

weird! …frustrating too!

anyone have any idea about this?

I seem to remember something similar with creating tracks for bezier handles in splines, but I couldn’t find anything…

thanks for any help/ideas/direction

1 Reply

hi,

you first have to create a controller for the property before you can create keys on it.


 Sequence Sequence_Begin_End:off pos:[2.10911,-18.9042,0] isSelected:on
  
 macros.run "Track View" "LaunchDopeSheetEditor" 
  
 $.Sequence_Begin_End = off
 
 -- assign an on_off controller
 $.Sequence_Begin_End = On_Off()
  
 addNewKey $.Sequence_Begin_End.controller 0f #select
  
 addNewKey $.Sequence_Begin_End.controller 5f #select
  
 

hOpe this helps,
o