Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/interface/interface_eyedropper_color.c
| Show First 20 Lines • Show All 157 Lines • ▼ Show 20 Lines | void eyedropper_color_sample_fl(bContext *C, int mx, int my, float r_col[3]) | ||||
| if (area) { | if (area) { | ||||
| if (area->spacetype == SPACE_IMAGE) { | if (area->spacetype == SPACE_IMAGE) { | ||||
| ARegion *region = BKE_area_find_region_xy(area, RGN_TYPE_WINDOW, mx, my); | ARegion *region = BKE_area_find_region_xy(area, RGN_TYPE_WINDOW, mx, my); | ||||
| if (region) { | if (region) { | ||||
| SpaceImage *sima = area->spacedata.first; | SpaceImage *sima = area->spacedata.first; | ||||
| int mval[2] = {mx - region->winrct.xmin, my - region->winrct.ymin}; | int mval[2] = {mx - region->winrct.xmin, my - region->winrct.ymin}; | ||||
| if (ED_space_image_color_sample(sima, region, mval, r_col)) { | if (ED_space_image_color_sample(sima, region, mval, r_col, NULL)) { | ||||
| return; | return; | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| else if (area->spacetype == SPACE_NODE) { | else if (area->spacetype == SPACE_NODE) { | ||||
| ARegion *region = BKE_area_find_region_xy(area, RGN_TYPE_WINDOW, mx, my); | ARegion *region = BKE_area_find_region_xy(area, RGN_TYPE_WINDOW, mx, my); | ||||
| if (region) { | if (region) { | ||||
| SpaceNode *snode = area->spacedata.first; | SpaceNode *snode = area->spacedata.first; | ||||
| ▲ Show 20 Lines • Show All 196 Lines • Show Last 20 Lines | |||||