diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-01-21 06:30:40 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-01-21 06:30:40 +0400 |
commit | 38cee985bb6d6a45fe59cc539dfa9cd6412b6f36 (patch) | |
tree | 59497913e5644e045b21ecb7ba7ad0ee3a5a8ac8 /source/blender/editors | |
parent | add25e43adae7204d27685eafefde343096d5698 (diff) |
code cleanup: style & warnings.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/interface/interface_panel.c | 3 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_image.c | 14 | ||||
-rw-r--r-- | source/blender/editors/transform/transform.c | 2 |
3 files changed, 10 insertions, 9 deletions
diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c index 9fc453aec7b..00c45e41587 100644 --- a/source/blender/editors/interface/interface_panel.c +++ b/source/blender/editors/interface/interface_panel.c @@ -1154,8 +1154,9 @@ int ui_handler_panel_region(bContext *C, wmEvent *event) if (block->rect.xmin <= mx && block->rect.xmin + PNL_HEADER >= mx) inside_header = 1; } - else if (block->rect.xmin > mx || block->rect.xmax < mx); + else if (block->rect.xmin > mx || block->rect.xmax < mx) { /* outside left/right side */ + } else if ((block->rect.ymax <= my) && (block->rect.ymax + PNL_HEADER >= my)) { inside_header = 1; } diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c index 03fcba488a8..c27b61d41e2 100644 --- a/source/blender/editors/sculpt_paint/paint_image.c +++ b/source/blender/editors/sculpt_paint/paint_image.c @@ -1567,8 +1567,9 @@ static ProjPixel *project_paint_uvpixel_init( } /* screenspace unclamped, we could keep its z and w values but don't need them at the moment */ - if(ps->brush->mtex.brush_map_mode == MTEX_MAP_MODE_3D) + if (ps->brush->mtex.brush_map_mode == MTEX_MAP_MODE_3D) { copy_v3_v3(projPixel->worldCoSS, world_spaceCo); + } copy_v2_v2(projPixel->projCoSS, pixelScreenCo); @@ -2520,16 +2521,15 @@ static void project_paint_face_init(const ProjPaintState *ps, const int thread_i if ((ps->do_occlude == FALSE) || !project_bucket_point_occluded(ps, bucketFaceNodes, face_index, pixelScreenCo)) { - mask = project_paint_uvpixel_mask(ps, face_index, side, w); - + if (mask > 0.0f) { BLI_linklist_prepend_arena( bucketPixelNodes, project_paint_uvpixel_init(ps, arena, ibuf, x, y, mask, face_index, - image_index, pixelScreenCo, wco, side, w), - arena - ); + image_index, pixelScreenCo, wco, side, w), + arena + ); } } @@ -5021,7 +5021,7 @@ static void project_state_init(bContext *C, Object *ob, ProjPaintState *ps) /* disable for 3d mapping also because painting on mirrored mesh can create "stripes" */ ps->do_masking = (brush->flag & BRUSH_AIRBRUSH || brush->mtex.brush_map_mode == MTEX_MAP_MODE_VIEW || - brush->mtex.brush_map_mode == MTEX_MAP_MODE_3D) ? false : true; + brush->mtex.brush_map_mode == MTEX_MAP_MODE_3D) ? false : true; ps->is_texbrush = (brush->mtex.tex) ? 1 : 0; diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index 48184355382..7fa9f40a4ee 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -908,7 +908,7 @@ int transformEvent(TransInfo *t, wmEvent *event) initVertSlide(t); } /* vert slide can fail on unconnected vertices (rare but possible) */ - if(t->state == TRANS_CANCEL) { + if (t->state == TRANS_CANCEL) { t->state = TRANS_STARTING; resetTransRestrictions(t); restoreTransObjects(t); |