Page MenuHome

Extract functions from GRAPH_OT_decimate
AbandonedPublic

Authored by Christoph Lendenfeld (ChrisLend) on Oct 22 2020, 7:52 PM.

Details

Summary

Cleanup Phase 2

This patch extracts functions from GRAPH_OT_decimate in order to make them reusable for future operators in graph_slider_ops.c.

This means mostly renaming things and moving functions to the top that will be reused later.

Diff Detail

Repository
rB Blender

Event Timeline

This patch no longer cleanly applies onto prior patches.

source/blender/editors/space_graph/graph_slider_ops.c
163–166

You can use BLI_genericNodeN(copy) here.

This patch can be split up to make the review process easier. Also it helps to mention what has changed exactly so I know what to look for and what's intentional.

For example: extract store_original_bezt_arrays appears much more non-trivial than it really is.

The things that appear to happen are:

  • decimate_graph_keys() appears be moved with the filter ANIM_FILTER extracted. But the diff itself makes it appear non-trivial so I have to take a closer look. If the patch was separate, then accepting the isolated changes would be much easier.
  • graph_slider_draw_status_header() generalized by making mode_str a parameter.
  • extract store_original_bezt_arrays
  • graphkeys_decimate_invoke() moved with var renaming
  • rename tDecimateGraphOp to tGraphSliderOp
  • rename parms dgo to gso (you missed some)
  • rename bezt_arr_list to original_bezt_arr_list
  • rename decimate_exit graph_slider_exit

You can group the patches by renames, by extraction, by moving code around (which shouldn't occur at the same time as other renames, extractions, etc).

source/blender/editors/space_graph/graph_slider_ops.c
280

dgo->gso

321

dgo->gso

342

dgo->gso

Abandoned because it was split into
D12486 D12487 D12489 D12490