Anim: don't include handles when calculating FCurve bounds in Graph Editor #120519
|
@ -242,8 +242,10 @@ static void graph_main_region_draw(const bContext *C, ARegion *region)
|
|||
graph_draw_curves(&ac, sipo, region, 1);
|
||||
|
||||
/* XXX(ton): the slow way to set tot rect... but for nice sliders needed. */
|
||||
/* Excluding handles from the calculation to save performance. This cuts the time it takes for
|
||||
* this function to run in half which is a major performance bottleneck on heavy scenes. */
|
||||
get_graph_keyframe_extents(
|
||||
&ac, &v2d->tot.xmin, &v2d->tot.xmax, &v2d->tot.ymin, &v2d->tot.ymax, false, true);
|
||||
&ac, &v2d->tot.xmin, &v2d->tot.xmax, &v2d->tot.ymin, &v2d->tot.ymax, false, false);
|
||||
/* extra offset so that these items are visible */
|
||||
v2d->tot.xmin -= 10.0f;
|
||||
v2d->tot.xmax += 10.0f;
|
||||
|
|
Loading…
Reference in New Issue