Previously the decimation would take the whole curve into account when decimating and not just the selected part.
If this new method is OK I will also update BKE_curve_decimate_nurb (Bezier/Nurbs object decimate) to match this behavior.
Differential D6286
Make curve decimation only take into account the selected curve points Authored by Sebastian Parborg (zeddb) on Nov 21 2019, 4:21 PM.
Details Previously the decimation would take the whole curve into account when decimating and not just the selected part. If this new method is OK I will also update BKE_curve_decimate_nurb (Bezier/Nurbs object decimate) to match this behavior.
Diff Detail Event TimelineThere are a very large number of changes, so older changes are hidden. Show Older Changes Comment Actions Updated the patch so the redo panel pops up after each operation. We will need to double check that any graph editor operation doesn't have any properties that should be hidden. The decimate operator now also works as a modal operator. Comment Actions
Probably a good idea to refer to D4841 in the description.
Comment Actions I tried it out, but it doesn't seem to work for me. Decimate (Ratio) seems to always select the left-most keyframes: I imported a BVH, selected some keyframes in a single range, and chose Decimate (Ratio) from the menu. Here is the Blend file: Decimate (Allowed Change) doesn't seem to do anything. It looks like it doesn't have the wave-in-thin-air-to-change-the-parameter behaviour, and an error of 500 doesn't do anything either. Comment Actions Ok, the fix works, but it's still confusing. The patch description doesn't mention anything about the interpolation type changing, and neither do the tooltips. Would it be better if linearly interpolated keyframes are changed back to linear after the decimation is done?
Comment Actions I discussed this with @Sebastian Parborg (zeddb) and given how the decimate algorithm works (fitting Bézier curves) this wouldn't produce good results. @Sebastian Parborg (zeddb) there still is the issue of telling users that this change from linear to Bézier will happen. I still don't feel confident that this is what can naturally be expected from the words 'Decimate' and 'remove keyframes', so IMO it should be mentioned in a tooltip (AFAICS it's pretty much the only space available for this if we don't want to cram full sentences in the menu item label).
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||