This patch adds two user definable parameters to the Bounce keyframe & Grease Pencil interpolation. It adds a parameter for "gravity" and a parameter for the "bounciness".
The "gravity" changes the force on the object, causing it to fall (or move) more quickly over the same distance. It is to simulate the actual gravity on an object. The "bounciness" changes the amount of energy an object has. It is a percentage (0.0 - 1.0 range) the object should bounce in relation to it's previous height. So a value of 50% should cause the object to bounce up to 50% of it's previous height on each bounce. The general strategy has changed from the previous implementation (see the various comments in this patch revision for details), though previously had an implementation that was a bit more similar to the previous implementation.
The original Bounce keyframe had hard-coded values which resulted in 3 bounces with a "bounciness" of 0.5. This current revision changes that to allow a more natural interaction, modifying both the gravity and bounciness and was suggested by Henrik Dick. The intention of this patch is to allow for quick, secondary animations that can get by with some fairly straightforward bouncing. The current, hard-coded values of 3 bounces didn't provide enough flexibility (at least for me) to be overly useful, but having this flexibility allows me to quickly add some bounces to background or secondary objects and I've found it useful for motion graphics in certain situations.
The way I would envision this being used (and the way I've used it) is to simply keyframe the start position of an object, move to the frame and position where the object should come to rest (or simply stop bouncing) and keyframe. The I go into the graph editor and choose the Bounce keyframe for the first keyframe. This gives a bouncing effect which can be modified with the parameters to get the desired effect.



