diff options
author | Julian Eisel <julian@blender.org> | 2020-04-03 14:25:03 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2020-04-03 14:34:50 +0300 |
commit | 905c0269f302e8e0e7a27dda8d5256fdcd06ce60 (patch) | |
tree | 1c720d4f0069879d5b4c0c9ea8db867106920d4f /source/blender/editors/interface/interface_eyedropper_color.c | |
parent | 1a69384e76e2b1ab11c87a582eb2cdf26386ac59 (diff) |
Cleanup: Rename ScrArea variables from sa to area
Follow up of b2ee1770d4c3 and 10c2254d412d, part of T74432.
Now the area and region naming conventions should be less confusing.
Mostly a careful batch rename but had to do few smaller fixes.
Also ran clang-format on affected files.
Diffstat (limited to 'source/blender/editors/interface/interface_eyedropper_color.c')
-rw-r--r-- | source/blender/editors/interface/interface_eyedropper_color.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/editors/interface/interface_eyedropper_color.c b/source/blender/editors/interface/interface_eyedropper_color.c index 372fd841bc1..7527a1e0662 100644 --- a/source/blender/editors/interface/interface_eyedropper_color.c +++ b/source/blender/editors/interface/interface_eyedropper_color.c @@ -137,15 +137,15 @@ void eyedropper_color_sample_fl(bContext *C, int mx, int my, float r_col[3]) /* we could use some clever */ Main *bmain = CTX_data_main(C); bScreen *screen = CTX_wm_screen(C); - ScrArea *sa = BKE_screen_find_area_xy(screen, SPACE_TYPE_ANY, mx, my); + ScrArea *area = BKE_screen_find_area_xy(screen, SPACE_TYPE_ANY, mx, my); const char *display_device = CTX_data_scene(C)->display_settings.display_device; struct ColorManagedDisplay *display = IMB_colormanagement_display_get_named(display_device); - if (sa) { - if (sa->spacetype == SPACE_IMAGE) { - ARegion *region = BKE_area_find_region_xy(sa, RGN_TYPE_WINDOW, mx, my); + if (area) { + if (area->spacetype == SPACE_IMAGE) { + ARegion *region = BKE_area_find_region_xy(area, RGN_TYPE_WINDOW, mx, my); if (region) { - SpaceImage *sima = sa->spacedata.first; + SpaceImage *sima = area->spacedata.first; int mval[2] = {mx - region->winrct.xmin, my - region->winrct.ymin}; if (ED_space_image_color_sample(sima, region, mval, r_col)) { @@ -153,10 +153,10 @@ void eyedropper_color_sample_fl(bContext *C, int mx, int my, float r_col[3]) } } } - else if (sa->spacetype == SPACE_NODE) { - ARegion *region = BKE_area_find_region_xy(sa, RGN_TYPE_WINDOW, mx, my); + else if (area->spacetype == SPACE_NODE) { + ARegion *region = BKE_area_find_region_xy(area, RGN_TYPE_WINDOW, mx, my); if (region) { - SpaceNode *snode = sa->spacedata.first; + SpaceNode *snode = area->spacedata.first; int mval[2] = {mx - region->winrct.xmin, my - region->winrct.ymin}; if (ED_space_node_color_sample(bmain, snode, region, mval, r_col)) { @@ -164,10 +164,10 @@ void eyedropper_color_sample_fl(bContext *C, int mx, int my, float r_col[3]) } } } - else if (sa->spacetype == SPACE_CLIP) { - ARegion *region = BKE_area_find_region_xy(sa, RGN_TYPE_WINDOW, mx, my); + else if (area->spacetype == SPACE_CLIP) { + ARegion *region = BKE_area_find_region_xy(area, RGN_TYPE_WINDOW, mx, my); if (region) { - SpaceClip *sc = sa->spacedata.first; + SpaceClip *sc = area->spacedata.first; int mval[2] = {mx - region->winrct.xmin, my - region->winrct.ymin}; if (ED_space_clip_color_sample(sc, region, mval, r_col)) { |