diff options
author | Richard Antalik <richardantalik@gmail.com> | 2020-03-02 04:49:35 +0300 |
---|---|---|
committer | Richard Antalik <richardantalik@gmail.com> | 2020-03-02 04:49:35 +0300 |
commit | e9e4f6af9e79ea73eb26a2ce57f10bf600d9c6e3 (patch) | |
tree | 3ead30acb8d90e55fedd644996bd7eed11f3eba8 /source/blender/editors/space_sequencer/sequencer_draw.c | |
parent | eaf0528749c8386a738b27e45bea61bbb971eb39 (diff) |
Fix T74320: Sound strip waveforms drawing allows negative volume values
While animating sound strips volume within the graph editor, it is possible to set keyframes to negative values.
The drawing code of waveforms wasn't clamping these values to zero and was instead drawing an "inverted" curve
Author: a.monti
Reviewed By: iss
Differential Revision: https://developer.blender.org/D6971
Diffstat (limited to 'source/blender/editors/space_sequencer/sequencer_draw.c')
-rw-r--r-- | source/blender/editors/space_sequencer/sequencer_draw.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c index 8a917e4c902..a4558f31cc8 100644 --- a/source/blender/editors/space_sequencer/sequencer_draw.c +++ b/source/blender/editors/space_sequencer/sequencer_draw.c @@ -338,6 +338,7 @@ static void drawseqwave(View2D *v2d, if (fcu && !BKE_fcurve_is_empty(fcu)) { float evaltime = x1_offset + (i * stepsize); volume = evaluate_fcurve(fcu, evaltime); + CLAMP_MIN(volume, 0.0f); } value1 *= volume; value2 *= volume; |