ScriptSpot

Script

Reduce Transform Keys

By craigpmiller · 2009-06-27

Version
1.0
Version requirement
Written for MAX 2009
Votes
17
Description

This is not my first attempt at writing max script, I've hacked a ittle around the edges with adding custom attributes - Thanks PEN - but this is my first attempt at a useful/functional tool.

Reduce Your Transform Keys is designed to strip away all the transforms that don't do anything.

By default the range is set to your current animation range but you can confine the key pruning to a specific region for your timeline.

I don't like losing the key a frame 0 so I added a radiobutton to add one and ...

Just in case - add a key at the end of the animation range.

Hope you can put it to good use.

😎

 

Additional Info

It's a macroscript so run it and ReduceYourTransformKeys should appear under "Craig's Tools" Add it to a quad or menu.
Attachments

Tags: transform, keyframes, reduce

Comments (6)

111 · 2009-06-27

isn't it a thing like built-in REDUCE KEYS function?

craigpmiller · 2009-06-27

Most, if not all, scripts use or make existing functions.

On my home PC running my script takes half the time using the button in the curve editor takes I think because it redraws the display every time it removes a key.

Cheers

Anubis · 2009-06-27

about "reduceKeys $.modifiers[1] 0.5 1f" you forgot to call controller, so change to >
reduceKeys $.modifiers[1].controller 0.5 1f
Good luck!

craigpmiller · 2009-06-27

Anubis,
Yes, I tried that but I get an

"-- No ""reduceKeys"" function for undefined"

error message.

Which, frankly, tells me nothing about why it broke.

Thanks for the suggestion.

Cheers

craigpmiller · 2009-06-27

I was looking for a way to reduce keys in a modifier but when I ran

reduceKeys $.modifiers[1] 0.5 1f

It does the job and reduced the keys on the first modifier in the stack ...

But totally trashes the modifier panel which will not display anything, not the selected object name, list of modifiers nothin'! Buttons inactive. Caput!

 OMG!! 😕🤐😬

 Wot have I done? 😆

Any hints out there?

Anubis · 2009-12-06

Sorry if too late but i dont see someone to reply so... just in case you still not found solution -- reduceKeys() function has a bug in Max 2009. Exist a forum topic about this in Autodesk Area. Briefly, modify panel must be not open, or just look into my 'Bake Transform' script code:
http://www.scriptspot.com/3ds-max/bake-transform

Best regards, Anubis