diff options
author | Joshua Leung <aligorith@gmail.com> | 2009-03-15 13:39:02 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2009-03-15 13:39:02 +0300 |
commit | 329aa658c97470a6ac2861c0c9b8108ff0c48182 (patch) | |
tree | 7ed0dac0fb21860dfaab04c4c5269ed6057249eb /source/blender/editors/space_graph/space_graph.c | |
parent | 6508ad460fa91d605de2f62320711b19a319e2cb (diff) |
F-Curve Modifiers: Groundwork for getting these working
- Completed cleaning up the drawing code so that F-Curves with modifiers now get drawn to reflect this.
- Added a temporary operator to add modifiers (hotkey Ctrl-Shift-M)
Diffstat (limited to 'source/blender/editors/space_graph/space_graph.c')
-rw-r--r-- | source/blender/editors/space_graph/space_graph.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/editors/space_graph/space_graph.c b/source/blender/editors/space_graph/space_graph.c index e6365db92ad..9466a0674d1 100644 --- a/source/blender/editors/space_graph/space_graph.c +++ b/source/blender/editors/space_graph/space_graph.c @@ -230,12 +230,13 @@ static void graph_main_area_draw(const bContext *C, ARegion *ar) unitx= (sipo->flag & SIPO_DRAWTIME)? V2D_UNIT_SECONDS : V2D_UNIT_FRAMESCALE; grid= UI_view2d_grid_calc(C, v2d, unitx, V2D_GRID_NOCLAMP, unity, V2D_GRID_NOCLAMP, ar->winx, ar->winy); UI_view2d_grid_draw(C, v2d, grid, V2D_GRIDLINES_ALL); - UI_view2d_grid_free(grid); /* draw data */ - if (ANIM_animdata_get_context(C, &ac)) { - graph_draw_curves(&ac, sipo, ar); - } + if (ANIM_animdata_get_context(C, &ac)) + graph_draw_curves(&ac, sipo, ar, grid); + + /* only free grid after drawing data, as we need to use it to determine sampling rate */ + UI_view2d_grid_free(grid); /* current frame */ if (sipo->flag & SIPO_DRAWTIME) flag |= DRAWCFRA_UNIT_SECONDS; |