Fix the eyedropper not working properly with different scene linear spaces

Either was some residue from the past or somebody didn't implement this in
the right way.

Also fixed memory leak in ED_space_clip_color_sample() caused by missing
image buffer release.
This commit is contained in:
2014-04-14 13:45:09 +06:00
parent f24bfcffef
commit 0d38f21cbc
7 changed files with 40 additions and 20 deletions

View File

@@ -149,7 +149,7 @@ static void eyedropper_color_sample_fl(bContext *C, Eyedropper *UNUSED(eye), int
int mval[2] = {mx - ar->winrct.xmin,
my - ar->winrct.ymin};
if (ED_space_image_color_sample(sima, ar, mval, r_col)) {
if (ED_space_image_color_sample(CTX_data_scene(C), sima, ar, mval, r_col)) {
return;
}
}
@@ -161,7 +161,7 @@ static void eyedropper_color_sample_fl(bContext *C, Eyedropper *UNUSED(eye), int
int mval[2] = {mx - ar->winrct.xmin,
my - ar->winrct.ymin};
if (ED_space_node_color_sample(snode, ar, mval, r_col)) {
if (ED_space_node_color_sample(CTX_data_scene(C), snode, ar, mval, r_col)) {
return;
}
}
@@ -173,7 +173,7 @@ static void eyedropper_color_sample_fl(bContext *C, Eyedropper *UNUSED(eye), int
int mval[2] = {mx - ar->winrct.xmin,
my - ar->winrct.ymin};
if (ED_space_clip_color_sample(sc, ar, mval, r_col)) {
if (ED_space_clip_color_sample(CTX_data_scene(C), sc, ar, mval, r_col)) {
return;
}
}