diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-01-22 17:35:02 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-01-22 17:35:02 +0400 |
commit | 0f108dede6842cd555410ec40b291fd4eb26fcc3 (patch) | |
tree | bad46547f053232364526260266d6f1c6f69353e /source | |
parent | 61bb1a3b50222b1727738c968fa0fec69cdb8eb1 (diff) |
style cleanup
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/interface/interface_icons.c | 22 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/drawobject.c | 23 |
2 files changed, 25 insertions, 20 deletions
diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c index 4f62a6d90ae..8b4b1752774 100644 --- a/source/blender/editors/interface/interface_icons.c +++ b/source/blender/editors/interface/interface_icons.c @@ -528,7 +528,7 @@ static void icon_verify_datatoc(IconImage *iimg) if (iimg->datatoc_rect) { ImBuf *bbuf = IMB_ibImageFromMemory(iimg->datatoc_rect, - iimg->datatoc_size, IB_rect, NULL, "<matcap icon>"); + iimg->datatoc_size, IB_rect, NULL, "<matcap icon>"); /* w and h were set on initialize */ if (bbuf->x != iimg->h && bbuf->y != iimg->w) IMB_scalefastImBuf(bbuf, iimg->w, iimg->h); @@ -542,16 +542,16 @@ static void icon_verify_datatoc(IconImage *iimg) static void init_matcap_icons(void) { /* dynamic allocation now, tucking datatoc pointers in DrawInfo */ -#define INIT_MATCAP_ICON(icon_id, name) \ - { \ - unsigned char *rect = (unsigned char *)datatoc_ ##name## _jpg; \ - int size = datatoc_ ##name## _jpg_size; \ - DrawInfo *di; \ - \ - di = def_internal_icon(NULL, icon_id, 0, 0, 128, ICON_TYPE_BUFFER); \ - di->data.buffer.image->datatoc_rect = rect; \ - di->data.buffer.image->datatoc_size = size; \ - } +#define INIT_MATCAP_ICON(icon_id, name) \ + { \ + unsigned char *rect = (unsigned char *)datatoc_ ##name## _jpg; \ + int size = datatoc_ ##name## _jpg_size; \ + DrawInfo *di; \ + \ + di = def_internal_icon(NULL, icon_id, 0, 0, 128, ICON_TYPE_BUFFER); \ + di->data.buffer.image->datatoc_rect = rect; \ + di->data.buffer.image->datatoc_size = size; \ + } (void)0 INIT_MATCAP_ICON(ICON_MATCAP_01, mc01); INIT_MATCAP_ICON(ICON_MATCAP_02, mc02); diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index b3f022d8870..b4c9c0cd912 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -169,21 +169,26 @@ static void ob_wire_color_blend_theme_id(const unsigned char ob_wire_col[4], con } /* this condition has been made more complex since editmode can draw textures */ -static int check_object_draw_texture(Scene *scene, View3D *v3d, int drawtype) +static bool check_object_draw_texture(Scene *scene, View3D *v3d, int drawtype) { /* texture and material draw modes */ - if (ELEM(v3d->drawtype, OB_TEXTURE, OB_MATERIAL) && drawtype > OB_SOLID) - return TRUE; + if (ELEM(v3d->drawtype, OB_TEXTURE, OB_MATERIAL) && drawtype > OB_SOLID) { + return true; + } /* textured solid */ - if (v3d->drawtype == OB_SOLID && (v3d->flag2 & V3D_SOLID_TEX) - && !BKE_scene_use_new_shading_nodes(scene)) - return TRUE; + if ((v3d->drawtype == OB_SOLID) && + (v3d->flag2 & V3D_SOLID_TEX) && + (BKE_scene_use_new_shading_nodes(scene) == false)) + { + return true; + } - if (v3d->flag2 & V3D_SHOW_SOLID_MATCAP) - return 1; + if (v3d->flag2 & V3D_SHOW_SOLID_MATCAP) { + return true; + } - return FALSE; + return false; } static int check_ob_drawface_dot(Scene *sce, View3D *vd, char dt) |