Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c
- index f1ee606a06b..27353cfcb33 100644
- --- a/source/blender/editors/space_sequencer/sequencer_draw.c
- +++ b/source/blender/editors/space_sequencer/sequencer_draw.c
- @@ -38,12 +38,14 @@
- #include "DNA_space_types.h"
- #include "DNA_userdef_types.h"
- #include "DNA_sound_types.h"
- +#include "DNA_anim_types.h"
- #include "BKE_context.h"
- #include "BKE_global.h"
- #include "BKE_sequencer.h"
- #include "BKE_sound.h"
- #include "BKE_scene.h"
- +#include "BKE_fcurve.h"
- #include "IMB_colormanagement.h"
- #include "IMB_imbuf.h"
- @@ -251,8 +253,10 @@ static void drawseqwave(View2D *v2d,
- float yscale = (y2 - y1) / 2.0f;
- float samplestep;
- float startsample, endsample;
- + float volume = 1;
- float value1, value2;
- bSound *sound = seq->sound;
- + FCurve *fcu = id_data_find_fcurve(&scene->id, seq, &RNA_Sequence, "volume", 0, NULL);
- SoundWaveform *waveform;
- @@ -329,8 +333,12 @@ static void drawseqwave(View2D *v2d,
- value2 = (1.0f - f) * value2 + f * waveform->data[p * 3 + 4];
- }
- - value1 *= seq->volume;
- - value2 *= seq->volume;
- + if (fcu) {
- + float evaltime = x1_offset + (i * stepsize);
- + volume = evaluate_fcurve(fcu, evaltime);
- + }
- + value1 *= volume;
- + value2 *= volume;
- if (value2 > 1 || value1 < -1) {
- immAttr4f(col, 1.0f, 0.0f, 0.0f, 0.5f);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement