Notifications
Clear all
[Closed] IsAnimated
Oct 08, 2016 5:01 pm
I want to collect all animated objects in the scene, keyframes can be on any track (baseobject,modifiers,materials …). I know some methods, but actually I’m looking for fastest way.
2 Replies
Oct 08, 2016 5:01 pm
We are already discussed it on this forum. I think the best solution was suggested by LO – the using of TrackbarFilters
1 Reply
Do you mean this thread: http://forums.cgsociety.org/showthread.php?f=98&t=1020938&page=1&pp=15
Cool!, I think final code must be like this:
(
local ts = timestamp()
local mem = heapfree
global animatedNodes = #()
fn myCallbackFilterFunction theAnimatable theParent theSubAnimIndex theGrandParent theNode =
(
if isController theanimatable and theanimatable.keys.count > 2 then
(
appendIfUnique animatedNodes theNode
false
)
else true
)
with redraw off
(
trackbar.filter = #all
local filtind = maxops.trackbar.registerFilter myCallbackFilterFunction undefined "." 1 active:on
disableRefMsgs()
local sel = getCurrentSelection()
select objects
enableRefMsgs()
maxops.trackbar.redraw forceRedraw:on
maxops.trackbar.unregisterfilter filtind
disableRefMsgs()
select sel
enableRefMsgs()
format "Time: %ms
" (timestamp()-ts)
format "Memory: %
" (mem-heapfree)
format "Nodes Found: %
" ((animatedNodes).count)
ok
)
)