MaxScript NumSelKeys and GetKeyIndex doesnt work on pos.controller

MaxScript NumSelKeys and GetKeyIndex doesnt work on pos.controller

Anonymous
Not applicable
869 Views
2 Replies
Message 1 of 3

MaxScript NumSelKeys and GetKeyIndex doesnt work on pos.controller

Anonymous
Not applicable

Hi,

 

first of all - sorry for my bad english. Im from Germany.

I use 3ds Max 2014 64bit on Windows 7 Professional 64bit

 


At the moment i have some troubles with the NumSelKeys and GetKeyIndex - functions.
These both functions work fine on height.controller and so on, but if you use it on pos.controller the listener always gives "0" as answer.

 

For example:

 

  • random object in scene and selected
  • there are some Frames (position-changing) betwenn 0f and 1000f
  • selectkeys $.pos.controller (interval 0 1000)
  • --> the key between f0 and f1000 are selected perfectly
  • numselkeys $.pos.controller
  • --> listener: "0" regardless how many keys are selected

Same Problem with GetKeyIndex

 

  • getkeyindex $.pos.controller 19 --> listener: "0"
  • but in the scene there is on Time 19 a position-changing frame

Maybe there is a problem with indexing on the pos.controller in 3ds Max???

 

Thank you for reading!

0 Likes
870 Views
2 Replies
Replies (2)
Message 2 of 3

Steve_Curley
Mentor
Mentor
Position is a compound controller - you'll need to access each constituent controller to get those values. Although you may see (for example) 5 keys in the Trackbar, there may be different combinations of the sub-controller keys i.e. if the move on a specific key only affects the X controller there may not be a key (on that frame) for the Y and Z controllers.
numselKeys $.pos.controller.x_Position.controller --shows 5
numselKeys $.pos.controller.y_Position.controller --shows 4
numselKeys $.pos.controller.z_Position.controller --shows 4
That's why numSelKeys can't return a value for the whole controller, but selecting them works because it CAN select all the sub-controller keys within the interval.

[edit] Same for getKeyIndex - the keys are on the sub-controllers, not the pos controller [/edit]

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

Message 3 of 3

Anonymous
Not applicable

interesting fact... never knew that this is a "special" controller.

anyways... thank you for ur response

0 Likes