MaxScript: Controller value access

MaxScript: Controller value access

istan
Advisor Advisor
1,277 Views
5 Replies
Message 1 of 6

MaxScript: Controller value access

istan
Advisor
Advisor

Maybe I am missing something, but is it really not possible to access a certain key value without moving the timeslider to a certain time first?

 

There exists

node.controller.value

but without any time parameter..

 

I am looking for someting like this:

 

getvalue node.controller time

 

0 Likes
Accepted solutions (1)
1,278 Views
5 Replies
Replies (5)
Message 2 of 6

Steve_Curley
Mentor
Mentor
Accepted solution
The value of a key at a specific time or the value of a controller at a specific time whether there's a key at that time or not?

For the former you'd have deal with the Keys arrays and determine if there's one at the specificed time.

For the latter "at time" appears to work.
For example, a simple box moving from a -X postion to a +X position over the default 100 frames (keys at frame 0 and 100 only):-
at time 50F $Box001.position.controller.x_position.controller.value
will return the X position of the Box at frame 50, regardless of the position of the time slider. Note - only tested in the Maxscript Listener, not in an actual script.

Max 2016 (SP1/EXT1)
Win7Pro x64 (SP1). i5-3570K @ 4.4GHz, 8Gb Ram, DX11.
nVidia GTX760 (2GB) (Driver 430.86).

0 Likes
Message 3 of 6

istan
Advisor
Advisor
Hi Steve,
thanks. Should be part of the mxs doc..
Istan
0 Likes
Message 4 of 6

Steve_Curley
Mentor
Mentor
It sort of is, albeit implied rather than stated explicitly. Actually it was an inspired guess (or a wild stab in the dark) 😉

Max 2016 (SP1/EXT1)
Win7Pro x64 (SP1). i5-3570K @ 4.4GHz, 8Gb Ram, DX11.
nVidia GTX760 (2GB) (Driver 430.86).

0 Likes
Message 5 of 6

istan
Advisor
Advisor
works - thanks!
0 Likes
Message 6 of 6

Steve_Curley
Mentor
Mentor
You're welcome 🙂

Max 2016 (SP1/EXT1)
Win7Pro x64 (SP1). i5-3570K @ 4.4GHz, 8Gb Ram, DX11.
nVidia GTX760 (2GB) (Driver 430.86).

0 Likes