Fix VSE color picker
Fix VSE color picker mouse coords calculation Reviewers: brecht Differential Revision: https://developer.blender.org/D4396
This commit is contained in:
parent
9c99292a16
commit
a761a93d41
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue