diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-10-06 08:56:41 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-10-06 08:56:41 +0300 |
commit | c454d816a936e509aa3daaa27bd92037cfe6de0e (patch) | |
tree | ba60eb092d12f456f5591966a2d49dc210309de7 /source/blender | |
parent | c82efd3276b2f377bc9420eb7fb75d20d2a7a88a (diff) |
Cleanup: style
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/colortools.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/image.c | 3 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/pbvh.c | 6 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/scene.c | 2 | ||||
-rw-r--r-- | source/blender/blenlib/intern/noise.c | 12 | ||||
-rw-r--r-- | source/blender/blenloader/intern/versioning_270.c | 2 | ||||
-rw-r--r-- | source/blender/editors/interface/interface_handlers.c | 9 | ||||
-rw-r--r-- | source/blender/editors/render/render_internal.c | 2 | ||||
-rw-r--r-- | source/blender/editors/screen/screen_context.c | 3 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_vertex_color_utils.c | 2 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt.c | 39 | ||||
-rw-r--r-- | source/blender/editors/space_file/filelist.c | 3 | ||||
-rw-r--r-- | source/blender/editors/space_image/image_ops.c | 3 | ||||
-rw-r--r-- | source/blender/python/generic/bgl.c | 2 |
14 files changed, 45 insertions, 45 deletions
diff --git a/source/blender/blenkernel/intern/colortools.c b/source/blender/blenkernel/intern/colortools.c index ee0f904c3a6..310255a15c1 100644 --- a/source/blender/blenkernel/intern/colortools.c +++ b/source/blender/blenkernel/intern/colortools.c @@ -1380,7 +1380,7 @@ void scopes_update(Scopes *scopes, ImBuf *ibuf, const ColorManagedViewSettings * /* Keep number of threads in sync with the merge parts below. */ ScopesUpdateData data = { - .scopes = scopes, . ibuf = ibuf, + .scopes = scopes, .ibuf = ibuf, .cm_processor = cm_processor, .display_buffer = display_buffer, .ycc_mode = ycc_mode, .bin_lum = bin_lum, .bin_r = bin_r, .bin_g = bin_g, .bin_b = bin_b, .bin_a = bin_a, }; diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index 90f2fe3d547..54f0923cabc 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -1454,8 +1454,7 @@ static bool do_add_image_extension(char *string, const char imtype, const ImageF if (extension) { /* prefer this in many cases to avoid .png.tga, but in certain cases it breaks */ /* remove any other known image extension */ - if (BLI_testextensie_array(string, imb_ext_image)) - { + if (BLI_testextensie_array(string, imb_ext_image)) { return BLI_replace_extension(string, FILE_MAX, extension); } else { diff --git a/source/blender/blenkernel/intern/pbvh.c b/source/blender/blenkernel/intern/pbvh.c index 9b6c5f05a3d..d739f804fef 100644 --- a/source/blender/blenkernel/intern/pbvh.c +++ b/source/blender/blenkernel/intern/pbvh.c @@ -607,7 +607,8 @@ void BKE_pbvh_build_grids(PBVH *bvh, CCGElem **grids, MEM_freeN(prim_bbc); } -void BKE_pbvh_set_ccgdm(PBVH *bvh, CCGDerivedMesh *ccgdm) { +void BKE_pbvh_set_ccgdm(PBVH *bvh, CCGDerivedMesh *ccgdm) +{ bvh->ccgdm = ccgdm; } @@ -1334,7 +1335,8 @@ void BKE_pbvh_get_grid_key(const PBVH *bvh, CCGKey *key) *key = bvh->gridkey; } -CCGDerivedMesh *BKE_pbvh_get_ccgdm(const PBVH *bvh) { +CCGDerivedMesh *BKE_pbvh_get_ccgdm(const PBVH *bvh) +{ return bvh->ccgdm; } diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c index c0dcac33656..d32a3a293fd 100644 --- a/source/blender/blenkernel/intern/scene.c +++ b/source/blender/blenkernel/intern/scene.c @@ -2371,7 +2371,7 @@ int BKE_scene_num_threads(const Scene *scene) int BKE_render_preview_pixel_size(const RenderData *r) { if (r->preview_pixel_size == 0) { - return (U.pixelsize > 1.5f)? 2 : 1; + return (U.pixelsize > 1.5f) ? 2 : 1; } return r->preview_pixel_size; } diff --git a/source/blender/blenlib/intern/noise.c b/source/blender/blenlib/intern/noise.c index 86c24307ae2..83012694ac0 100644 --- a/source/blender/blenlib/intern/noise.c +++ b/source/blender/blenlib/intern/noise.c @@ -1395,9 +1395,9 @@ static float voronoi_CrS(float x, float y, float z) static float cellNoiseU(float x, float y, float z) { /* avoid precision issues on unit coordinates */ - x = (x + 0.000001f)*1.00001f; - y = (y + 0.000001f)*1.00001f; - z = (z + 0.000001f)*1.00001f; + x = (x + 0.000001f) * 1.00001f; + y = (y + 0.000001f) * 1.00001f; + z = (z + 0.000001f) * 1.00001f; int xi = (int)(floor(x)); int yi = (int)(floor(y)); @@ -1417,9 +1417,9 @@ float cellNoise(float x, float y, float z) void cellNoiseV(float x, float y, float z, float ca[3]) { /* avoid precision issues on unit coordinates */ - x = (x + 0.000001f)*1.00001f; - y = (y + 0.000001f)*1.00001f; - z = (z + 0.000001f)*1.00001f; + x = (x + 0.000001f) * 1.00001f; + y = (y + 0.000001f) * 1.00001f; + z = (z + 0.000001f) * 1.00001f; int xi = (int)(floor(x)); int yi = (int)(floor(y)); diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c index 08e8d904b88..6c863eacfbe 100644 --- a/source/blender/blenloader/intern/versioning_270.c +++ b/source/blender/blenloader/intern/versioning_270.c @@ -1677,7 +1677,7 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main) /* Fix for invalid state of screen due to bug in older versions. */ for (bScreen *sc = main->screen.first; sc; sc = sc->id.next) { for (ScrArea *sa = sc->areabase.first; sa; sa = sa->next) { - if(sa->full && sc->state == SCREENNORMAL) { + if (sa->full && sc->state == SCREENNORMAL) { sa->full = NULL; } } diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index af414f7f3f0..f7dfb4b7fd2 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -9249,7 +9249,8 @@ static int ui_handle_menu_event( UI_BTYPE_BUT_MENU, UI_BTYPE_MENU, UI_BTYPE_BLOCK, UI_BTYPE_PULLDOWN) && - count == act) { + count == act) + { doit = true; } @@ -10228,9 +10229,9 @@ void UI_popup_handlers_remove(ListBase *handlers, uiPopupBlockHandle *popup) handler->ui_userdata == popup) { /* tag refresh parent popup */ - if (handler->next && - handler->next->ui_handle == ui_popup_handler && - handler->next->ui_remove == ui_popup_handler_remove) + if (handler->next && + handler->next->ui_handle == ui_popup_handler && + handler->next->ui_remove == ui_popup_handler_remove) { uiPopupBlockHandle *parent_popup = handler->next->ui_userdata; ED_region_tag_refresh_ui(parent_popup->region); diff --git a/source/blender/editors/render/render_internal.c b/source/blender/editors/render/render_internal.c index 26c863d8514..ff64476a13c 100644 --- a/source/blender/editors/render/render_internal.c +++ b/source/blender/editors/render/render_internal.c @@ -1317,7 +1317,7 @@ static void render_view3d_startjob(void *customdata, short *stop, short *do_upda if (restore) RE_DataBase_IncrementalView(re, rp->viewmat, 1); - rp->resolution_divider = MAX2(rp->resolution_divider/2, pixel_size); + rp->resolution_divider = MAX2(rp->resolution_divider / 2, pixel_size); *do_update = 1; render_update_resolution(re, rp, use_border, &cliprct); diff --git a/source/blender/editors/screen/screen_context.c b/source/blender/editors/screen/screen_context.c index 293e507c2b3..1190423e2f1 100644 --- a/source/blender/editors/screen/screen_context.c +++ b/source/blender/editors/screen/screen_context.c @@ -609,8 +609,7 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult return 1; } } - else if (CTX_data_equals(member, "selected_editable_fcurves")) - { + else if (CTX_data_equals(member, "selected_editable_fcurves")) { bAnimContext ac; if (ANIM_animdata_get_context(C, &ac) && ELEM(ac.spacetype, SPACE_ACTION, SPACE_IPO)) { diff --git a/source/blender/editors/sculpt_paint/paint_vertex_color_utils.c b/source/blender/editors/sculpt_paint/paint_vertex_color_utils.c index 096bebba0e4..398512287c4 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex_color_utils.c +++ b/source/blender/editors/sculpt_paint/paint_vertex_color_utils.c @@ -297,7 +297,7 @@ BLI_INLINE uint mcol_colordodge(uint col1, uint col2, int fac) cp[0] = (mfac * cp1[0] + temp * fac) / 255; temp = (cp2[1] == 255) ? 255 : min_ii((cp1[1] * 225) / (255 - cp2[1]), 255); cp[1] = (mfac * cp1[1] + temp * fac) / 255; - temp = (cp2[2] == 255) ? 255 : min_ii((cp1[2] * 225 )/ (255 - cp2[2]), 255); + temp = (cp2[2] == 255) ? 255 : min_ii((cp1[2] * 225) / (255 - cp2[2]), 255); cp[2] = (mfac * cp1[2] + temp * fac) / 255; temp = (cp2[3] == 255) ? 255 : min_ii((cp1[3] * 225) / (255 - cp2[3]), 255); cp[3] = (mfac * cp1[3] + temp * fac) / 255; diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 487ab32c5a6..64eff7186d9 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -4531,29 +4531,28 @@ bool sculpt_stroke_get_location(bContext *C, float out[3], const float mouse[2]) if (hit == false) { const Brush *brush = BKE_paint_brush(BKE_paint_get_active_from_context(C)); if (ELEM(brush->falloff_shape, PAINT_FALLOFF_SHAPE_TUBE)) { - SculptFindNearestToRayData srd = { - .original = original, - .ss = ob->sculpt, - .hit = 0, - .ray_start = ray_start, - .ray_normal = ray_normal, - .depth = FLT_MAX, - .dist_sq_to_ray = FLT_MAX, - }; - BKE_pbvh_find_nearest_to_ray( - ss->pbvh, sculpt_find_nearest_to_ray_cb, &srd, - ray_start, ray_normal, srd.original); - if (srd.hit) { - hit = true; - copy_v3_v3(out, ray_normal); - mul_v3_fl(out, srd.depth); - add_v3_v3(out, ray_start); - } + SculptFindNearestToRayData srd = { + .original = original, + .ss = ob->sculpt, + .hit = 0, + .ray_start = ray_start, + .ray_normal = ray_normal, + .depth = FLT_MAX, + .dist_sq_to_ray = FLT_MAX, + }; + BKE_pbvh_find_nearest_to_ray( + ss->pbvh, sculpt_find_nearest_to_ray_cb, &srd, + ray_start, ray_normal, srd.original); + if (srd.hit) { + hit = true; + copy_v3_v3(out, ray_normal); + mul_v3_fl(out, srd.depth); + add_v3_v3(out, ray_start); + } } } - //used in vwpaint - if (cache && hit){ + if (cache && hit) { copy_v3_v3(cache->true_location, out); } diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c index 48f3dd4fde6..d670af59bc9 100644 --- a/source/blender/editors/space_file/filelist.c +++ b/source/blender/editors/space_file/filelist.c @@ -1994,8 +1994,7 @@ int ED_path_extension_type(const char *path) else if (BLI_testextensie(path, ".abc")) { return FILE_TYPE_ALEMBIC; } - else if (BLI_testextensie_array(path, imb_ext_image)) - { + else if (BLI_testextensie_array(path, imb_ext_image)) { return FILE_TYPE_IMAGE; } else if (BLI_testextensie(path, ".ogg")) { diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index b30c1d129d4..02e246d8630 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -1330,7 +1330,8 @@ static int image_open_exec(bContext *C, wmOperator *op) iuser->framenr = 1; if (ima->source == IMA_SRC_MOVIE) { iuser->offset = 0; - } else { + } + else { iuser->offset = frame_ofs - 1; } iuser->fie_ima = 2; diff --git a/source/blender/python/generic/bgl.c b/source/blender/python/generic/bgl.c index 9cf00192db5..a0185b0f4fa 100644 --- a/source/blender/python/generic/bgl.c +++ b/source/blender/python/generic/bgl.c @@ -802,7 +802,7 @@ static PyObject *Buffer_new(PyTypeObject *UNUSED(type), PyObject *args, PyObject "`GL_TYPE` and `typestr` of object with buffer interface do not match. '%s'", pybuffer.format); } else if (ndimensions != pybuffer.ndim || - !compare_dimensions(ndimensions, dimensions, pybuffer.shape)) + !compare_dimensions(ndimensions, dimensions, pybuffer.shape)) { PyErr_Format(PyExc_TypeError, "array size does not match"); } |