Hi
I wanted to fit all selected objects keyframes in timeline with a script.
I found one script in a cgsociety forum by HornBerger
I modify it to use on multiple objects, but it works only with position controller.
Could it be possible to make it work with all controllers ?
Thanks
[code]
(
debb = 10000
finn=-10000
for a in selection do
(
sortKeys a.controller
num_keys = numkeys a.position.controller
starttime = getkeytime a.position.controller 1
endtime = starttime
for i = 1 to num_keys do
(
key_time = getkeytime a.position.controller i
if key_time > endtime then
endtime = key_time
)
if starttime < debb then debb = starttime
if endtime > finn then finn = endtime
)
animationRange = interval debb finn
)
[\code]
miauu · 2019-10-21