Notifications
Clear all

[Closed] list animated channels

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!!

2 Replies
 eek
 
 
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
)

Hi Eek,
Thanks, im gonna have a look at it tomorrow!