Fix: Don't draw spans for out of bounds retiming keys in the VSE
Previously the spans would be drawn even if you had slid the retiming keys out of bounds of the strip margins, leading to them being drawn out side of the strip. Pull Request: https://projects.blender.org/blender/blender/pulls/123438
This commit is contained in:
@@ -320,6 +320,14 @@ void sequencer_retiming_draw_continuity(const TimelineDrawContext *timeline_ctx,
|
||||
|
||||
float key_position = UI_view2d_view_to_region_x(v2d, key_x_get(scene, seq, &key));
|
||||
float prev_key_position = UI_view2d_view_to_region_x(v2d, key_x_get(scene, seq, &key - 1));
|
||||
if (prev_key_position > right_handle_position) {
|
||||
/* Don't draw highlights for out of bounds retiming keys. */
|
||||
continue;
|
||||
}
|
||||
if (key_position < left_handle_position) {
|
||||
/* Don't draw highlights for out of bounds retiming keys. */
|
||||
continue;
|
||||
}
|
||||
prev_key_position = max_ff(prev_key_position, left_handle_position);
|
||||
key_position = min_ff(key_position, right_handle_position);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user