PDA

View Full Version : list animated channels


Cycone
06-05-2011, 07:52 PM
Hi All,
This might be a very noobish question, I have never really used max (im a maya / houdini guy) but Im (trying) to write a timewarp script for the max guys at work.
I've gotten pretty far but I'm stuck at the point where I want to list the animated channels of an object / camera. Have looked at every google hit and cgtalk search but no luck.

I can query them by hand, but it's nicer and quicker if I only run my magic on the animated channels....

So is there a way to get an array of the animated channels / controllers??

Thanks!!

eek
06-05-2011, 09:54 PM
fn getSubs obj children =
(
for i = 1 to (getSubAnimNames obj).count do
(
try
(
if obj[i].isAnimated != False do
(
append children[1] (getSubAnimName obj i asString:True)
append children[2] obj[i].controller
)
getSubs obj[i] children
)
catch()
)

)

children = #(#(),#())
getSubs selection[1] children

children



something like this is a start. Also if you dont want to include the parent of sub anims: e.g only the the X,Y,Z and not the transform controller itself you could change it to this:

if obj[i].numSubs == 0 do
(
append children[1] (getSubAnimName obj i asString:True)
append children[2] obj[i].controller
)

Cycone
06-05-2011, 10:03 PM
Hi Eek,
Thanks, im gonna have a look at it tomorrow!

CGTalk Moderation
06-05-2011, 10:03 PM
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.