diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-03-27 02:45:06 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-03-27 02:45:06 +0400 |
commit | 36d25daa096484a99a689d42016f790d4399aa2c (patch) | |
tree | a3d7b93b0999e3b72639af3fa072f15388c5992d /source/blender | |
parent | 9f91fc10ab648c7a0a28b3b3ef87078675b497c7 (diff) |
style cleanup
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/BKE_node.h | 8 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/brush.c | 15 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/curve.c | 6 | ||||
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 4 |
4 files changed, 16 insertions, 17 deletions
diff --git a/source/blender/blenkernel/BKE_node.h b/source/blender/blenkernel/BKE_node.h index ddb85e4ccfd..e234d6c519e 100644 --- a/source/blender/blenkernel/BKE_node.h +++ b/source/blender/blenkernel/BKE_node.h @@ -628,17 +628,17 @@ void BKE_node_tree_unlink_id(ID *id, struct bNodeTree *ntree); * * Examples: * - * FOREACH_NODETREE(bmain, nodetree) + * FOREACH_NODETREE(bmain, nodetree) { * if (id == nodetree) * printf("This is a linkable node tree"); - * FOREACH_NODETREE_END + * } FOREACH_NODETREE_END * - * FOREACH_NODETREE(bmain, nodetree) + * FOREACH_NODETREE(bmain, nodetree) { * if (nodetree->idname == "ShaderNodeTree") * printf("This is a shader node tree); * if (GS(id) == ID_MA) * printf(" and it's owned by a material"); - * FOREACH_NODETREE_END + * } FOREACH_NODETREE_END */ /* should be an opaque type, only for internal use by BKE_node_tree_iter_*** */ diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c index aab2bcce70b..2f666bf5922 100644 --- a/source/blender/blenkernel/intern/brush.c +++ b/source/blender/blenkernel/intern/brush.c @@ -525,8 +525,7 @@ float BKE_brush_sample_tex_3D(const Scene *scene, Brush *br, float radius = 1.0f; /* Quite warnings */ float co[3]; - if (mtex->brush_map_mode == MTEX_MAP_MODE_VIEW) - { + if (mtex->brush_map_mode == MTEX_MAP_MODE_VIEW) { /* keep coordinates relative to mouse */ rotation += ups->brush_rotation; @@ -545,7 +544,8 @@ float BKE_brush_sample_tex_3D(const Scene *scene, Brush *br, x = point_2d[0]; y = point_2d[1]; - } else if (mtex->brush_map_mode == MTEX_MAP_MODE_RANDOM) { + } + else if (mtex->brush_map_mode == MTEX_MAP_MODE_RANDOM) { rotation += ups->brush_rotation; /* these contain a random coordinate */ x = point_2d[0] - ups->tex_mouse[0]; @@ -992,11 +992,12 @@ void BKE_brush_jitter_pos(const Scene *scene, Brush *brush, const float pos[2], } } -void BKE_brush_randomize_texture_coordinates(UnifiedPaintSettings *ups) { +void BKE_brush_randomize_texture_coordinates(UnifiedPaintSettings *ups) +{ /* we multiply with brush radius as an optimization for the brush * texture sampling functions */ - ups->tex_mouse[0] = BLI_rng_get_float(brush_rng)*ups->pixel_radius; - ups->tex_mouse[1] = BLI_rng_get_float(brush_rng)*ups->pixel_radius; + ups->tex_mouse[0] = BLI_rng_get_float(brush_rng) * ups->pixel_radius; + ups->tex_mouse[1] = BLI_rng_get_float(brush_rng) * ups->pixel_radius; } /* Uses the brush curve control to find a strength value between 0 and 1 */ @@ -1039,7 +1040,7 @@ unsigned int *BKE_brush_gen_texture_cache(Brush *br, int half_side) texcache = MEM_callocN(sizeof(int) * side * side, "Brush texture cache"); - /*do normalized cannonical view coords for texture*/ + /* do normalized cannonical view coords for texture */ for (y = -1.0, iy = 0; iy < side; iy++, y += step) { for (x = -1.0, ix = 0; ix < side; ix++, x += step) { co[0] = x; diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c index 853a55b49c2..56f2237a61f 100644 --- a/source/blender/blenkernel/intern/curve.c +++ b/source/blender/blenkernel/intern/curve.c @@ -1653,7 +1653,7 @@ static int cu_isectLL(const float v1[3], const float v2[3], const float v3[3], c } -static short bevelinside(BevList *bl1, BevList *bl2) +static bool bevelinside(BevList *bl1, BevList *bl2) { /* is bl2 INSIDE bl1 ? with left-right method and "lambda's" */ /* returns '1' if correct hole */ @@ -1701,9 +1701,7 @@ static short bevelinside(BevList *bl1, BevList *bl2) bevp++; } - if ( (links & 1) && (rechts & 1) ) - return 1; - return 0; + return (links & 1) && (rechts & 1); } diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 3ada62a048a..fe7f66e73fa 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -8685,7 +8685,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main) /* Fix for bug #32982, internal_links list could get corrupted from r51630 onward. * Simply remove bad internal_links lists to avoid NULL pointers. */ - FOREACH_NODETREE(main, ntree, id) + FOREACH_NODETREE(main, ntree, id) { bNode *node; bNodeLink *link, *nextlink; @@ -8697,7 +8697,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main) } } } - FOREACH_NODETREE_END + } FOREACH_NODETREE_END } if (main->versionfile < 264 || (main->versionfile == 264 && main->subversionfile < 6)) { |