Blender Git Commit Log

Git Commits -> Revision 667af6c

Revision 667af6c by Jacques Lucke (master)
May 2, 2019, 10:00 (GMT)
Refactor grid and scale indicator text drawing

This affects the timeline, dopesheet, graph editor, sequencer,
clip editor and nla editor.

Removed structs and enums: `V2D_ARG_DUMMY`, `eView2D_Units`,
`eView2D_Clamp`, `eView2D_Gridlines`, `View2DGrid`.

A main goal of this refactor is to get rid of the very generic
`View2DGrid` struct. The drawing code became very complex
because there were many different combinations of settings.

This refactor implements a different approach.
Instead of one very generic API, there are many slighly
different functions that do exactly, what we need in the
different editors. Only very little code is duplicated,
because the API functions compose some shared low level code.

This structure makes the code much easier to debug and change,
because every function has much fewer responsibilities.

Additionally, this refactor fixes some long standing bugs.
E.g. when `Show Seconds` is enabled, you zoom in and pan the view.
Or that the step size between displayed frame numbers was
always `>= 2`, no matter how close you zoom in.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4776

Commit Details:

Full Hash: 667af6cf411918ba181afc1a7d6bcb474f9fadb8
Parent Commit: 5b14b56
Lines Changed: +617, -627

1 Added Path:

/source/blender/editors/interface/view2d_draw.c (+526, -0) (View)

12 Modified Paths:

/source/blender/editors/include/UI_view2d.h (+46, -60) (Diff)
/source/blender/editors/interface/CMakeLists.txt (+1, -0) (Diff)
/source/blender/editors/interface/view2d.c (+4, -462) (Diff)
/source/blender/editors/space_action/space_action.c (+3, -14) (Diff)
/source/blender/editors/space_clip/clip_graph_draw.c (+2, -6) (Diff)
/source/blender/editors/space_clip/space_clip.c (+7, -15) (Diff)
/source/blender/editors/space_graph/graph_draw.c (+8, -11) (Diff)
/source/blender/editors/space_graph/graph_intern.h (+0, -2) (Diff)
/source/blender/editors/space_graph/space_graph.c (+8, -19) (Diff)
/source/blender/editors/space_nla/space_nla.c (+4, -14) (Diff)
/source/blender/editors/space_sequencer/sequencer_draw.c (+4, -7) (Diff)
/source/blender/editors/transform/transform_snap.c (+4, -17) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021