Notifications
Clear all
[Closed] Please, "Delete all Subframe Keys From Selected Ojects"
Apr 10, 2006 11:06 pm
Hi…
I baked my TP particles with 1/500 frame sub-sampling.
The result is a huge 700Mb file that I can not handle.
I want to delete all sub-frame keys.
Please somebody make a “Delete all Subframe Keys From Selected Ojects” script.
Thanks.
1 Reply
Apr 10, 2006 11:06 pm
This is messy and assumes you have the default max controllers on scale, rotation, and position.
for obj in selection do
(
selectkeys obj.scale.controller (interval animationrange.start animationrange.end)
for i = animationrange.start to animationrange.end do deselectKey obj.scale.controller (getKeyIndex obj.scale.controller i)
deleteKeys obj.scale.controller #selection
selectkeys obj.rotation.controller (interval animationrange.start animationrange.end)
for i = animationrange.start to animationrange.end do deselectKey obj.rotation.controller (getKeyIndex obj.rotation.controller[1].controller i)
deleteKeys obj.rotation.controller[1].controller #selection
for i = animationrange.start to animationrange.end do deselectKey obj.rotation.controller[2].controller (getKeyIndex obj.rotation.controller[2].controller i)
deleteKeys obj.rotation.controller[2].controller #selection
for i = animationrange.start to animationrange.end do deselectKey obj.rotation.controller[3].controller (getKeyIndex obj.rotation.controller[3].controller i)
deleteKeys obj.rotation.controller[3].controller #selection
selectkeys obj.pos.controller (interval animationrange.start animationrange.end)
for i = animationrange.start to animationrange.end do deselectKey obj.pos.controller (getKeyIndex obj.pos.controller[1].controller i)
deleteKeys obj.pos.controller[1].controller #selection
for i = animationrange.start to animationrange.end do deselectKey obj.pos.controller[2].controller (getKeyIndex obj.pos.controller[2].controller i)
deleteKeys obj.pos.controller[2].controller #selection
for i = animationrange.start to animationrange.end do deselectKey obj.pos.controller[3].controller (getKeyIndex obj.pos.controller[3].controller i)
deleteKeys obj.pos.controller[3].controller #selection
)