diff options
author | Joshua Leung <aligorith@gmail.com> | 2009-07-03 05:57:38 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2009-07-03 05:57:38 +0400 |
commit | 5e92ddece3a7367ca7687e762226d639389e5517 (patch) | |
tree | ba8437a82874057138ff5e9f07b446fa6d2ff044 /source/blender/editors/space_graph | |
parent | 28d371d1178642e17f5dfc300f1500a132ce7149 (diff) | |
parent | fb5f9273eba4b30e1aa0573388367592b18bdbba (diff) |
NLA SoC: Merge from 2.5
21301 to 21329
Diffstat (limited to 'source/blender/editors/space_graph')
-rw-r--r-- | source/blender/editors/space_graph/graph_edit.c | 5 | ||||
-rw-r--r-- | source/blender/editors/space_graph/graph_intern.h | 2 | ||||
-rw-r--r-- | source/blender/editors/space_graph/space_graph.c | 4 |
3 files changed, 9 insertions, 2 deletions
diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c index 2cade676817..28b6f0b4ab6 100644 --- a/source/blender/editors/space_graph/graph_edit.c +++ b/source/blender/editors/space_graph/graph_edit.c @@ -96,14 +96,15 @@ /* *************************** Calculate Range ************************** */ /* Get the min/max keyframes*/ -static void get_graph_keyframe_extents (bAnimContext *ac, float *xmin, float *xmax, float *ymin, float *ymax) +/* note: it should return total boundbox, filter for selection only can be argument... */ +void get_graph_keyframe_extents (bAnimContext *ac, float *xmin, float *xmax, float *ymin, float *ymax) { ListBase anim_data = {NULL, NULL}; bAnimListElem *ale; int filter; /* get data to filter, from Dopesheet */ - filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE | ANIMFILTER_SEL | ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY); + filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY); ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype); /* set large values to try to override */ diff --git a/source/blender/editors/space_graph/graph_intern.h b/source/blender/editors/space_graph/graph_intern.h index 86e5451122d..697c31eaa98 100644 --- a/source/blender/editors/space_graph/graph_intern.h +++ b/source/blender/editors/space_graph/graph_intern.h @@ -84,6 +84,8 @@ enum { /* ***************************************** */ /* graph_edit.c */ +void get_graph_keyframe_extents (struct bAnimContext *ac, float *xmin, float *xmax, float *ymin, float *ymax); + void GRAPH_OT_previewrange_set(struct wmOperatorType *ot); void GRAPH_OT_view_all(struct wmOperatorType *ot); diff --git a/source/blender/editors/space_graph/space_graph.c b/source/blender/editors/space_graph/space_graph.c index ef42b009bd4..b17861dc679 100644 --- a/source/blender/editors/space_graph/space_graph.c +++ b/source/blender/editors/space_graph/space_graph.c @@ -243,6 +243,10 @@ static void graph_main_area_draw(const bContext *C, ARegion *ar) /* draw curves twice - unselected, then selected, so that the are fewer occlusion problems */ graph_draw_curves(&ac, sipo, ar, grid, 0); graph_draw_curves(&ac, sipo, ar, grid, 1); + + /* XXX the slow way to set tot rect... but for nice sliders needed (ton) */ + get_graph_keyframe_extents(&ac, &v2d->tot.xmin, &v2d->tot.xmax, &v2d->tot.ymin, &v2d->tot.ymax); + } /* only free grid after drawing data, as we need to use it to determine sampling rate */ |