View Full Version : Position List. How to find keyframes within.

07 July 2011, 04:56 AM

im having a hard time trying to navigate through a position list controller. please help me.

1) Firstly. i need to know how to refer inside a position list controller and locate the eular position controller.

2) need to find the keyframes (count and value)

3) without doing all this, is there a way to just jump to the key framed values of any selected controller / object without having to refer to them by name... all i want to do is duplicate the key frames of one object to another, while adding an offset to the values individually. Assume that i do NOT know which parameters are keyframed!!

please help with the syntax.


07 July 2011, 07:56 AM
Euler position doesn't exists, I think you mean XYZ.

So how you can navigate through a position list controller the easiest way is via it's subAnims.

Say we have an object with a position list controller, with 2 controllers as subcontrollers

-- get the position list controller instance
pController = $.position.controller
-- get the first controllers keyframes
keys = pController[1].controller.keys
-- get the first controllers value
print pController[1].value
-- or
print pController[1].controller.value

-- for the second controller same principles
print pController[2].controller.keys.count

You should also really look up the list controller in the maxscript helpfile, much more stuff to play with.


07 July 2011, 11:42 AM
Well if you don't know what has keys you will need a recursive function that will use subAnims like JHN pointed out. For each controller found you test to see if it has keys and the test to find what key you want to work with. I discuss recursion here and in the XML tutorials as well.

CGTalk Moderation
07 July 2011, 11:42 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.