Page MenuHome

break up graph_edit.c
ClosedPublic

Authored by Christoph Lendenfeld (ChrisLend) on Oct 22 2020, 1:12 PM.

Details

Summary

Cleanup Phase 1

The file editors/space_graph/graph_edit.c has reached ~3600 lines.
Here is a quick overview what it includes:

  • set range extents, preview range
  • ghosting fcurves
  • keyframe manipulations (insert, copy&paste, duplicate, delete)
  • the decimate modal operator
  • baking and sampling (including sound)
  • setting keyframe interpolation
  • keyframe and cursor snapping
  • mirroring keyframes
  • fcurve modifiers
  • drivers

This patch splits off two files

  • graph_view.c: preview range, view all, view selected etc. Think about also including functions from graph_ops.c that do similar things
  • move the decimate modal operator into graph_slider_ops.c. A new file suggested in the parent task.

Diff Detail

Repository
rB Blender

Event Timeline

This revision was not accepted when it landed; it landed in state Needs Review.Nov 23 2020, 3:28 PM
This revision was automatically updated to reflect the committed changes.

I have committed the patch in a slightly modified form:

  • Brought back some comment cleanups that were rolled back (so cleaned-up comments were removed from graph_edit.c, and pre-cleanup versions of those comments were added in graph_slider_ops.c).
  • Removed some no-longer-necessary #includes from the new files.
  • Updated the copyright to 2020. I wasn't entirely sure about this, but I think the policy is to set the year to "now" whenever new files are created.
This revision is now accepted and ready to land.Nov 23 2020, 3:29 PM