Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
This is my tiny but powerful tweaked version of the original autoTangent by Michael Comet (https://www.comet-cartoons.com). Thanks to him for giving me permission to make this available here.
DESCRIPTION: Changes selected graph editor keys to be smooth but without overshoot. Kinda like 3DSMax's autoTangents. The amount of softness can be user set, so that the tangents will overshoot a little bit if desired.
This also has a built in UI to run all of this and to set the softness. The softness value is also remembered per session from the last one used.
MY IMPROVEMENTS: Soften value is now relative to curve and 1.000 is the soothest value without overshoot (next to flat keys) 0.00 is flat and 2 is some kind of overshoot. Also using just optionVars for flatten and soft now, so the values will be remembered and aTan_smoothKeys(); can be used for a hotkey. 2010/11/01 - minor tweak, deactivated print statements to gain speed (once for debugging)
USAGE: source "autoTangent.mel"; autoTangent(); u can use the "aTan_smoothKeys();" for a hotkey (without UI) when autoTangent is sourced.