Commit: e9e4f6af9e79ea73eb26a2ce57f10bf600d9c6e3
Author: Richard Antalik
Date:   Mon Mar 2 02:49:35 2020 +0100
Branches: master
https://developer.blender.org/rBe9e4f6af9e79ea73eb26a2ce57f10bf600d9c6e3

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

===================================================================

M       source/blender/editors/space_sequencer/sequencer_draw.c

===================================================================

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;

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to