Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Antalik <richardantalik@gmail.com>2019-03-18 22:04:11 +0300
committerRichard Antalik <richardantalik@gmail.com>2019-03-18 23:11:33 +0300
commita761a93d411da3798ff52f8c48381c5f46690818 (patch)
treef8040f5bdcfbdb4f6182bf7723fd5588124e0d59 /source/blender/editors/space_sequencer
parent9c99292a16df35a5d244606cc49e06949a4ef535 (diff)
Fix VSE color picker
Fix VSE color picker mouse coords calculation Reviewers: brecht Differential Revision: https://developer.blender.org/D4396
Diffstat (limited to 'source/blender/editors/space_sequencer')
-rw-r--r--source/blender/editors/space_sequencer/sequencer_view.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_view.c b/source/blender/editors/space_sequencer/sequencer_view.c
index d500a9a081d..d0e31dbbe79 100644
--- a/source/blender/editors/space_sequencer/sequencer_view.c
+++ b/source/blender/editors/space_sequencer/sequencer_view.c
@@ -100,8 +100,10 @@ static void sample_apply(bContext *C, wmOperator *op, const wmEvent *event)
UI_view2d_region_to_view(&ar->v2d, event->mval[0], event->mval[1], &fx, &fy);
- fx += (float) ibuf->x / 2.0f;
- fy += (float) ibuf->y / 2.0f;
+ fx += (float)scene->r.xsch / 2.0f;
+ fy += (float)scene->r.ysch / 2.0f;
+ fx *= (float)ibuf->x / (float)scene->r.xsch;
+ fy *= (float)ibuf->y / (float)scene->r.ysch;
if (fx >= 0.0f && fy >= 0.0f && fx < ibuf->x && fy < ibuf->y) {
const float *fp;