diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-03-24 06:51:46 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-03-24 06:51:46 +0400 |
commit | 2f348d8b5d7d897ad44d192a2fd5f2b99b906c76 (patch) | |
tree | 1b2612031fd1cb0e521c2e0e444e7b0bd2b77646 /source/blender/editors/space_image | |
parent | d6fd5266d0514e6d31fd0e11aab5322846d78589 (diff) |
style cleanup: mainly for mesh code, also some WM function use.
Diffstat (limited to 'source/blender/editors/space_image')
-rw-r--r-- | source/blender/editors/space_image/image_buttons.c | 26 | ||||
-rw-r--r-- | source/blender/editors/space_image/space_image.c | 42 |
2 files changed, 34 insertions, 34 deletions
diff --git a/source/blender/editors/space_image/image_buttons.c b/source/blender/editors/space_image/image_buttons.c index 209e87ae703..054d342ce4b 100644 --- a/source/blender/editors/space_image/image_buttons.c +++ b/source/blender/editors/space_image/image_buttons.c @@ -289,10 +289,10 @@ static void preview_cb(struct ScrArea *sa, struct uiBlock *block) areamouseco_to_ipoco(v2d, mval, &dispf.xmax, &dispf.ymax); /* map to render coordinates */ - disprect->xmin= dispf.xmin; - disprect->xmax= dispf.xmax; - disprect->ymin= dispf.ymin; - disprect->ymax= dispf.ymax; + disprect->xmin = dispf.xmin; + disprect->xmax = dispf.xmax; + disprect->ymin = dispf.ymin; + disprect->ymax = dispf.ymax; CLAMP(disprect->xmin, 0, winx); CLAMP(disprect->xmax, 0, winx); @@ -532,14 +532,14 @@ static void uiblock_layer_pass_buttons(uiLayout *layout, RenderResult *rr, Image /* menu buts */ if(render_slot) { strp= slot_menu(); - but= uiDefButS(block, MENU, 0, strp, 0, 0, wmenu1, UI_UNIT_Y, render_slot, 0,0,0,0, "Select Slot"); + but = uiDefButS(block, MENU, 0, strp, 0, 0, wmenu1, UI_UNIT_Y, render_slot, 0,0,0,0, "Select Slot"); uiButSetFunc(but, image_multi_cb, rr, iuser); MEM_freeN(strp); } if(rr) { strp= layer_menu(rr, &iuser->layer); - but= uiDefButS(block, MENU, 0, strp, 0, 0, wmenu2, UI_UNIT_Y, &iuser->layer, 0,0,0,0, "Select Layer"); + but = uiDefButS(block, MENU, 0, strp, 0, 0, wmenu2, UI_UNIT_Y, &iuser->layer, 0,0,0,0, "Select Layer"); uiButSetFunc(but, image_multi_cb, rr, iuser); MEM_freeN(strp); @@ -549,7 +549,7 @@ static void uiblock_layer_pass_buttons(uiLayout *layout, RenderResult *rr, Image rl= BLI_findlink(&rr->layers, layer); /* return NULL is meant to be */ strp= pass_menu(rl, &iuser->pass); - but= uiDefButS(block, MENU, 0, strp, 0, 0, wmenu3, UI_UNIT_Y, &iuser->pass, 0,0,0,0, "Select Pass"); + but = uiDefButS(block, MENU, 0, strp, 0, 0, wmenu3, UI_UNIT_Y, &iuser->pass, 0,0,0,0, "Select Pass"); uiButSetFunc(but, image_multi_cb, rr, iuser); MEM_freeN(strp); } @@ -572,17 +572,17 @@ static void uiblock_layer_pass_arrow_buttons(uiLayout *layout, RenderResult *rr, } /* decrease, increase arrows */ - but= uiDefIconBut(block, BUT, 0, ICON_TRIA_LEFT, 0,0,17,20, NULL, 0, 0, 0, 0, "Previous Layer"); + but = uiDefIconBut(block, BUT, 0, ICON_TRIA_LEFT, 0,0,17,20, NULL, 0, 0, 0, 0, "Previous Layer"); uiButSetFunc(but, image_multi_declay_cb, rr, iuser); - but= uiDefIconBut(block, BUT, 0, ICON_TRIA_RIGHT, 0,0,18,20, NULL, 0, 0, 0, 0, "Next Layer"); + but = uiDefIconBut(block, BUT, 0, ICON_TRIA_RIGHT, 0,0,18,20, NULL, 0, 0, 0, 0, "Next Layer"); uiButSetFunc(but, image_multi_inclay_cb, rr, iuser); uiblock_layer_pass_buttons(row, rr, iuser, 230 * dpi_fac, render_slot); /* decrease, increase arrows */ - but= uiDefIconBut(block, BUT, 0, ICON_TRIA_LEFT, 0,0,17,20, NULL, 0, 0, 0, 0, "Previous Pass"); + but = uiDefIconBut(block, BUT, 0, ICON_TRIA_LEFT, 0,0,17,20, NULL, 0, 0, 0, 0, "Previous Pass"); uiButSetFunc(but, image_multi_decpass_cb, rr, iuser); - but= uiDefIconBut(block, BUT, 0, ICON_TRIA_RIGHT, 0,0,18,20, NULL, 0, 0, 0, 0, "Next Pass"); + but = uiDefIconBut(block, BUT, 0, ICON_TRIA_RIGHT, 0,0,18,20, NULL, 0, 0, 0, 0, "Next Pass"); uiButSetFunc(but, image_multi_incpass_cb, rr, iuser); uiBlockEndAlign(block); @@ -677,7 +677,7 @@ void uiTemplateImage(uiLayout *layout, bContext *C, PointerRNA *ptr, const char uiBlockBeginAlign(block); uiDefIconTextBut(block, BUT, B_SIMA_RECORD, ICON_REC, "Record", 10,120,100,20, 0, 0, 0, 0, 0, ""); uiDefIconTextBut(block, BUT, B_SIMA_PLAY, ICON_PLAY, "Play", 110,120,100,20, 0, 0, 0, 0, 0, ""); - but= uiDefBut(block, BUT, B_NOP, "Free Cache", 210,120,100,20, 0, 0, 0, 0, 0, ""); + but = uiDefBut(block, BUT, B_NOP, "Free Cache", 210,120,100,20, 0, 0, 0, 0, 0, ""); uiButSetFunc(but, image_freecache_cb, ima, NULL); if(iuser->frames) @@ -766,7 +766,7 @@ void uiTemplateImage(uiLayout *layout, bContext *C, PointerRNA *ptr, const char uiItemR(col, userptr, "frame_duration", 0, str, ICON_NONE); if(ima->anim) { block= uiLayoutGetBlock(col); - but= uiDefBut(block, BUT, 0, "Match Movie Length", 0, 0, UI_UNIT_X*2, UI_UNIT_Y, NULL, 0, 0, 0, 0, "Set the number of frames to match the movie or sequence"); + but = uiDefBut(block, BUT, 0, "Match Movie Length", 0, 0, UI_UNIT_X*2, UI_UNIT_Y, NULL, 0, 0, 0, 0, "Set the number of frames to match the movie or sequence"); uiButSetFunc(but, set_frames_cb, ima, iuser); } diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c index 1af37a66022..5005e0de9c5 100644 --- a/source/blender/editors/space_image/space_image.c +++ b/source/blender/editors/space_image/space_image.c @@ -495,7 +495,7 @@ static void image_operatortypes(void) static void image_keymap(struct wmKeyConfig *keyconf) { - wmKeyMap *keymap= WM_keymap_find(keyconf, "Image Generic", SPACE_IMAGE, 0); + wmKeyMap *keymap = WM_keymap_find(keyconf, "Image Generic", SPACE_IMAGE, 0); wmKeyMapItem *kmi; WM_keymap_add_item(keymap, "IMAGE_OT_new", NKEY, KM_PRESS, KM_ALT, 0); @@ -509,7 +509,7 @@ static void image_keymap(struct wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "IMAGE_OT_cycle_render_slot", JKEY, KM_PRESS, 0, 0); RNA_boolean_set(WM_keymap_add_item(keymap, "IMAGE_OT_cycle_render_slot", JKEY, KM_PRESS, KM_ALT, 0)->ptr, "reverse", TRUE); - keymap= WM_keymap_find(keyconf, "Image", SPACE_IMAGE, 0); + keymap = WM_keymap_find(keyconf, "Image", SPACE_IMAGE, 0); WM_keymap_add_item(keymap, "IMAGE_OT_view_all", HOMEKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "IMAGE_OT_view_selected", PADPERIOD, KM_PRESS, 0, 0); @@ -540,7 +540,7 @@ static void image_keymap(struct wmKeyConfig *keyconf) RNA_enum_set(WM_keymap_add_item(keymap, "IMAGE_OT_curves_point_set", ACTIONMOUSE, KM_PRESS, KM_SHIFT, 0)->ptr, "point", 1); /* toggle editmode is handy to have while UV unwrapping */ - kmi= WM_keymap_add_item(keymap, "OBJECT_OT_mode_set", TABKEY, KM_PRESS, 0, 0); + kmi = WM_keymap_add_item(keymap, "OBJECT_OT_mode_set", TABKEY, KM_PRESS, 0, 0); RNA_enum_set(kmi->ptr, "mode", OB_MODE_EDIT); RNA_boolean_set(kmi->ptr, "toggle", TRUE); } @@ -724,14 +724,14 @@ static void image_main_area_set_view2d(SpaceImage *sima, ARegion *ar) winx= ar->winrct.xmax - ar->winrct.xmin + 1; winy= ar->winrct.ymax - ar->winrct.ymin + 1; - ar->v2d.tot.xmin= 0; - ar->v2d.tot.ymin= 0; - ar->v2d.tot.xmax= w; - ar->v2d.tot.ymax= h; + ar->v2d.tot.xmin = 0; + ar->v2d.tot.ymin = 0; + ar->v2d.tot.xmax = w; + ar->v2d.tot.ymax = h; - ar->v2d.mask.xmin= ar->v2d.mask.ymin= 0; - ar->v2d.mask.xmax= winx; - ar->v2d.mask.ymax= winy; + ar->v2d.mask.xmin = ar->v2d.mask.ymin = 0; + ar->v2d.mask.xmax = winx; + ar->v2d.mask.ymax = winy; /* which part of the image space do we see? */ x1= ar->winrct.xmin+(winx-sima->zoom*w)/2.0f; @@ -741,12 +741,12 @@ static void image_main_area_set_view2d(SpaceImage *sima, ARegion *ar) y1-= sima->zoom*sima->yof; /* relative display right */ - ar->v2d.cur.xmin= ((ar->winrct.xmin - (float)x1)/sima->zoom); - ar->v2d.cur.xmax= ar->v2d.cur.xmin + ((float)winx/sima->zoom); + ar->v2d.cur.xmin = ((ar->winrct.xmin - (float)x1)/sima->zoom); + ar->v2d.cur.xmax = ar->v2d.cur.xmin + ((float)winx/sima->zoom); /* relative display left */ - ar->v2d.cur.ymin= ((ar->winrct.ymin-(float)y1)/sima->zoom); - ar->v2d.cur.ymax= ar->v2d.cur.ymin + ((float)winy/sima->zoom); + ar->v2d.cur.ymin = ((ar->winrct.ymin-(float)y1)/sima->zoom); + ar->v2d.cur.ymax = ar->v2d.cur.ymin + ((float)winy/sima->zoom); /* normalize 0.0..1.0 */ ar->v2d.cur.xmin /= w; @@ -764,19 +764,19 @@ static void image_main_area_init(wmWindowManager *wm, ARegion *ar) // UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_STANDARD, ar->winx, ar->winy); /* image paint polls for mode */ - keymap= WM_keymap_find(wm->defaultconf, "Image Paint", 0, 0); + keymap = WM_keymap_find(wm->defaultconf, "Image Paint", 0, 0); WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct); - keymap= WM_keymap_find(wm->defaultconf, "UV Editor", 0, 0); + keymap = WM_keymap_find(wm->defaultconf, "UV Editor", 0, 0); WM_event_add_keymap_handler(&ar->handlers, keymap); - keymap= WM_keymap_find(wm->defaultconf, "UV Sculpt", 0, 0); + keymap = WM_keymap_find(wm->defaultconf, "UV Sculpt", 0, 0); WM_event_add_keymap_handler(&ar->handlers, keymap); /* own keymaps */ - keymap= WM_keymap_find(wm->defaultconf, "Image Generic", SPACE_IMAGE, 0); + keymap = WM_keymap_find(wm->defaultconf, "Image Generic", SPACE_IMAGE, 0); WM_event_add_keymap_handler(&ar->handlers, keymap); - keymap= WM_keymap_find(wm->defaultconf, "Image", SPACE_IMAGE, 0); + keymap = WM_keymap_find(wm->defaultconf, "Image", SPACE_IMAGE, 0); WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct); } @@ -851,7 +851,7 @@ static void image_buttons_area_init(wmWindowManager *wm, ARegion *ar) ED_region_panels_init(wm, ar); - keymap= WM_keymap_find(wm->defaultconf, "Image Generic", SPACE_IMAGE, 0); + keymap = WM_keymap_find(wm->defaultconf, "Image Generic", SPACE_IMAGE, 0); WM_event_add_keymap_handler(&ar->handlers, keymap); } @@ -890,7 +890,7 @@ static void image_scope_area_init(wmWindowManager *wm, ARegion *ar) ED_region_panels_init(wm, ar); - keymap= WM_keymap_find(wm->defaultconf, "Image Generic", SPACE_IMAGE, 0); + keymap = WM_keymap_find(wm->defaultconf, "Image Generic", SPACE_IMAGE, 0); WM_event_add_keymap_handler(&ar->handlers, keymap); } |