Code cleanup: style
authorCampbell Barton <ideasman42@gmail.com>
Fri, 7 Mar 2014 02:28:39 +0000 (13:28 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 7 Mar 2014 02:28:39 +0000 (13:28 +1100)
source/blender/blenkernel/intern/brush.c
source/blender/editors/sculpt_paint/sculpt.c
source/blender/editors/space_text/space_text.c
source/blender/editors/uvedit/uvedit_smart_stitch.c
source/blender/makesrna/intern/rna_sculpt_paint.c
source/blender/nodes/intern/node_util.c
source/blender/nodes/shader/nodes/node_shader_tex_wave.c

index 68da8f1a4d87fb8234d27c079bb744789fc4e169..5ef70948bbb3a801510092867b53474c7441541b 100644 (file)
@@ -993,7 +993,7 @@ unsigned int *BKE_brush_gen_texture_cache(Brush *br, int half_side, bool use_sec
                                /* This is copied from displace modifier code */
                                /* TODO(sergey): brush are always cacheing with CM enabled for now. */
                                externtex(mtex, co, &intensity,
-                                                 rgba, rgba + 1, rgba + 2, rgba + 3, 0, NULL);
+                                         rgba, rgba + 1, rgba + 2, rgba + 3, 0, NULL);
 
                                ((char *)texcache)[(iy * side + ix) * 4] =
                                ((char *)texcache)[(iy * side + ix) * 4 + 1] =
index 9b92ca6ccf8ef1b6abcd107c6c625f49d2ee1c95..df1b14a29ea567bcff7853bb8d4d53455eef5d43 100644 (file)
@@ -3922,8 +3922,8 @@ static void sculpt_update_cache_invariants(bContext *C, Sculpt *sd, SculptSessio
        mul_m3_v3(mat, viewDir);
        normalize_v3_v3(cache->true_view_normal, viewDir);
 
-       cache->supports_gravity = !ELEM3(brush->sculpt_tool, SCULPT_TOOL_MASK, SCULPT_TOOL_SMOOTH, SCULPT_TOOL_SIMPLIFY)
-                                                         && sd->gravity_factor > 0.0f;
+       cache->supports_gravity = (!ELEM3(brush->sculpt_tool, SCULPT_TOOL_MASK, SCULPT_TOOL_SMOOTH, SCULPT_TOOL_SIMPLIFY) &&
+                                  (sd->gravity_factor > 0.0f));
        /* get gravity vector in world space */
        if (cache->supports_gravity) {
                if (sd->gravity_object) {
@@ -4486,13 +4486,13 @@ static void sculpt_stroke_update_step(bContext *C, struct PaintStroke *UNUSED(st
        sculpt_restore_mesh(sd, ob);
 
        if (sd->flags & SCULPT_DYNTOPO_DETAIL_CONSTANT) {
-               BKE_pbvh_bmesh_detail_size_set(ss->pbvh, (float)sd->detail_size/100.0f);
+               BKE_pbvh_bmesh_detail_size_set(ss->pbvh, (float)sd->detail_size / 100.0f);
        }
        else {
                BKE_pbvh_bmesh_detail_size_set(ss->pbvh,
-                                                                          (ss->cache->radius /
-                                                                               (float)ups->pixel_radius) *
-                                                                          (float)sd->detail_size);
+                                              (ss->cache->radius /
+                                               (float)ups->pixel_radius) *
+                                              (float)sd->detail_size);
        }
 
        if (sculpt_stroke_dynamic_topology(ss, brush)) {
index 8b0800083d596af51fb1e7739a65981a387d160d..2986408d7eefc6008c5d02ccd73f39d8fa569481 100644 (file)
@@ -454,7 +454,7 @@ static void text_cursor(wmWindow *win, ScrArea *sa, ARegion *ar)
        SpaceText *st = sa->spacedata.first;
        int wmcursor = BC_TEXTEDITCURSOR;
 
-       if(st->text && BLI_rcti_isect_pt(&st->txtbar, win->eventstate->x - ar->winrct.xmin, st->txtbar.ymin)) {
+       if (st->text && BLI_rcti_isect_pt(&st->txtbar, win->eventstate->x - ar->winrct.xmin, st->txtbar.ymin)) {
                wmcursor = CURSOR_STD;
        }
 
index 6bf931583b68238ae22728b304e38be06af6a96a..3af947b472ea6c1a30d0da6583d56312511acca7 100644 (file)
@@ -685,7 +685,7 @@ static void stitch_uv_edge_generate_linked_edges(GHash *edge_hash, StitchState *
                                        edge2 = BLI_ghash_lookup(edge_hash, &edgetmp);
 
                                        /* more iteration to make sure non-manifold case is handled nicely */
-                                       for (eiter = edge; eiter; eiter = eiter->next){
+                                       for (eiter = edge; eiter; eiter = eiter->next) {
                                                if (edge2 == eiter) {
                                                        valid = false;
                                                        break;
index e13e9b3cad4d4a87b9e6582480c2f3e6f8fe2c24..635c9a3c374f23b9a3c28a32dc5b435dacc44fdc 100644 (file)
@@ -441,7 +441,7 @@ static void rna_def_sculpt(BlenderRNA  *brna)
        RNA_def_property_enum_bitflag_sdna(prop, NULL, "flags");
        RNA_def_property_enum_items(prop, detail_type_items);
        RNA_def_property_ui_text(prop, "Detail Type Method",
-                                                        "In dynamic-topology mode, how mesh detail size is calculated");
+                                "In dynamic-topology mode, how mesh detail size is calculated");
        RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL);
 
        prop = RNA_def_property(srna, "gravity", PROP_FLOAT, PROP_NONE);
index d3bde0a3b5602cd59cc774b0b14cf445212abc9b..dcc58d38d31f3b939cd924bc827b34c5ba29c10b 100644 (file)
@@ -196,8 +196,10 @@ static bNodeSocket *select_internal_link_input(bNode *node, bNodeSocket *output)
                if (nodeSocketIsHidden(input) ||                /* ignore hidden sockets */
                    input->flag & SOCK_NO_INTERNAL_LINK ||      /* ignore if input is not allowed for internal connections */
                    priority < 0 ||                             /* ignore incompatible types */
-                   priority < sel_priority)                  /* ignore if we already found a higher priority input */
+                   priority < sel_priority)                    /* ignore if we already found a higher priority input */
+               {
                        continue;
+               }
                
                /* determine if this input is preferred over the currently selected */
                preferred = (priority > sel_priority) ||    /* prefer higher datatype priority */
index e502f7d9d31a61fcbf418f20fd4003dc71642786..7dc97ad5eab019aa9eb1e97c7689c62a51432081 100644 (file)
@@ -38,7 +38,7 @@ static bNodeSocketTemplate sh_node_tex_wave_in[] = {
        {       -1, 0, ""       }
 };
 
-const bool internal_links[5] = {0,0,0,0,0};
+const bool internal_links[5] = {0, 0, 0, 0, 0};
 
 static bNodeSocketTemplate sh_node_tex_wave_out[] = {
        {       SOCK_RGBA, 0, N_("Color"),              0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_NONE, SOCK_NO_INTERNAL_LINK},