Fix #120950: Graph Editor FCurve line rendering
The issue was that the key bounds for determining if a key can be skipped were initialized incorrectly. The order of `rctf` is [xmin, xmax, ymin, ymax] but the values were given as [x, y, x, y]. The correct order is [x, x, y, y] Pull Request: https://projects.blender.org/blender/blender/pulls/126554
This commit is contained in:
committed by
Christoph Lendenfeld
parent
22698fc34c
commit
1b23a8983d
@@ -1049,7 +1049,7 @@ static void draw_fcurve_curve_keys(
|
||||
|
||||
BezTriple *first_key = &fcu->bezt[index_range.first()];
|
||||
rctf key_bounds = {
|
||||
first_key->vec[1][0], first_key->vec[1][1], first_key->vec[1][0], first_key->vec[1][1]};
|
||||
first_key->vec[1][0], first_key->vec[1][0], first_key->vec[1][1], first_key->vec[1][1]};
|
||||
/* Used when skipping keys. */
|
||||
bool has_skipped_keys = false;
|
||||
const float min_pixel_distance = 3.0f;
|
||||
@@ -1069,7 +1069,7 @@ static void draw_fcurve_curve_keys(
|
||||
curve_vertices.append({BLI_rctf_cent_x(&key_bounds), BLI_rctf_cent_y(&key_bounds)});
|
||||
has_skipped_keys = false;
|
||||
key_bounds = {
|
||||
prevbezt->vec[1][0], prevbezt->vec[1][1], prevbezt->vec[1][0], prevbezt->vec[1][1]};
|
||||
prevbezt->vec[1][0], prevbezt->vec[1][0], prevbezt->vec[1][1], prevbezt->vec[1][1]};
|
||||
expand_key_bounds(prevbezt, bezt, key_bounds);
|
||||
/* Calculate again based on the new prevbezt. */
|
||||
pixel_distance = calculate_pixel_distance(key_bounds, pixels_per_unit);
|
||||
|
||||
Reference in New Issue
Block a user