Age | Commit message (Collapse) | Author |
|
Differential Revision: https://developer.blender.org/D3746
|
|
Main issue was that the addon did not handled 'sampled_points' at all.
Now it converts such curves back to keyframes ones first.
This might not be optimal, but avoids having too different read logic,
and we cannot do anything to sampled fcurves from python anyway...
Also did some other fixes/enhancements:
* Fixed behavior with groups of fcurves when they did not have same keyframes
(was giving full crappy results with odd offsets).
* In `fitCubic()`, do not call `maxErrorAmount()` twice unless it's really needed.
* Use 'fast' remove/insert of keyframes!
* Use comprehensions to generate the init points data, saves some code lines
and is usually quicker.
Note performance gains (though mesurable) are not so fancy, we could probably
optimize much more by avoiding to use that custom nD vector class and all
(and probably even much much more by using numpy), most of the time being
spent inside complex math helpers, but for now it should work as expected at least.
|
|
Patch by sybrenstuvel (Sybren Stüvel), with own tweaking (main issue was,
fcurve needs to be updated when you have changed their keyframes), thanks!
|
|
Also simplified the code. There were a few things that were explicitly coded
while there are Python builtins that perform the same operation (and do it faster).
Reviewed by mont29 (Bastien Montagne).
|
|
edits), removed so this wont happen again.
|
|
|
|
|
|
|
|
|
|
thanks to Benjy Cook
well done!
|