Notifications
Clear all
[Closed] How to find all animation keys
Mar 13, 2012 1:56 pm
I have many object, class of each object are difference and type of controller each object are difference too: transform controller, visibility track, materials, sound…
I want to find all keys of all object, so, what do i should ?
Thank you !
4 Replies
Mar 13, 2012 1:56 pm
I’m not at my computer, but you can access the sub anim controllers using the numsubs property in a recursive function. The test the controller with supportsKeys.
Mar 13, 2012 1:56 pm
I took a stab at it. I hope it help you out.
(
--CREATE A FUNCTION TO FIND CONTROLLERS THAT SUPPORT KEYS
mapped fn getKeys obj theKeys =
(
for i = 1 to obj.numsubs do
(
if obj[i] != undefined do
(
for v = 1 to obj[i].numsubs do
(
getKeys obj[i][v] theKeys
)
if obj[i].controller != undefined do
(
if obj[i].controller.supportsKeys do
(
try
(
if obj[i].controller.keys.count > 0 do
(
append theKeys obj[i].controller.keys
)
)
catch()
)
)
)
)
return theKeys
)
--CREATE AN EMPTY ARRAY
KeyArray = #()
getKeys objects KeyArray
print KeyArray
)
Mar 13, 2012 1:56 pm
to find keys you have to find animated subanims… follow the discussion http://forums.cgsociety.org/showthread.php?f=98&t=1020938&highlight=keys