Notifications
Clear all

[Closed] animation tracks

Is there a way to get the number of animation tracks on an object? If unclear let me know.

3 Replies

Got most of this (if not all) from an older post on these forums, (I can’t remember who to credit this too though). Returns an array with the controllers that have keys on them.

fn getControllers nodePick = (
     	local ctrlList = #()
     	local refList = refs.dependsOn nodePick
     	
     	if refList != undefined then (
     		for r in refList do (
     			if (isProperty r #keyable) == true then (
     				if (isProperty r #keys) == true and (numKeys r) > 0  then (
     					append ctrlList r
     				)
     			)
     			join ctrlList (getControllers r)
     		)
     	)
     	ctrlList
     )

Ok, i see where this code is going, and i can modify for my exactly what i need…thanks

I don´t know for sure but I think it is Paul Neale´s code!

By the way, could someone explain me that “recursive function” stuff I´ve never got to understand it very well

thanks