style cleanup
authorCampbell Barton <ideasman42@gmail.com>
Sat, 2 Feb 2013 04:58:03 +0000 (04:58 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 2 Feb 2013 04:58:03 +0000 (04:58 +0000)
28 files changed:
source/blender/blenkernel/BKE_particle.h
source/blender/blenkernel/intern/displist.c
source/blender/blenkernel/intern/mesh.c
source/blender/blenkernel/intern/pbvh_bmesh.c
source/blender/blenkernel/intern/scene.c
source/blender/blenlib/intern/math_geom.c
source/blender/bmesh/tools/bmesh_bevel.c
source/blender/collada/SceneExporter.cpp
source/blender/collada/TransformReader.cpp
source/blender/editors/animation/anim_markers.c
source/blender/editors/interface/interface.c
source/blender/editors/interface/interface_anim.c
source/blender/editors/screen/screen_ops.c
source/blender/editors/sculpt_paint/paint_image.c
source/blender/editors/space_image/image_draw.c
source/blender/editors/space_outliner/outliner_edit.c
source/blender/editors/transform/transform_input.c
source/blender/editors/uvedit/uvedit_smart_stitch.c
source/blender/makesdna/DNA_brush_types.h
source/blender/makesrna/intern/makesrna.c
source/blender/makesrna/intern/rna_curve.c
source/blender/makesrna/intern/rna_sequencer.c
source/blender/nodes/composite/nodes/node_composite_channelMatte.c
source/blender/nodes/intern/node_common.c
source/blender/nodes/shader/node_shader_util.c
source/blender/render/intern/source/bake.c
source/blender/windowmanager/intern/wm_event_system.c
source/creator/creator.c

index 3394c4f4ce0a102059656ddcdf47e9947896910e..a9a8bc3206480a99b1e6a097a68e60781d547e88 100644 (file)
@@ -96,7 +96,7 @@ typedef struct SPHData {
        float *gravity;
        float hfac;
        /* Average distance to neighbours (other particles in the support domain),
-          for calculating the Courant number (adaptive time step). */
+        * for calculating the Courant number (adaptive time step). */
        int pass;
        float element_size;
        float flow[3];
index ada33691c1569205e6db8795bcd6348c95538884..08b107849b68b66eda01dcd305b98ed09b267133 100644 (file)
@@ -507,7 +507,7 @@ void BKE_displist_fill(ListBase *dispbase, ListBase *to, int flipnormal)
                        dl = dl->next;
                }
 
-               /* XXX (obedit && obedit->actcol)?(obedit->actcol-1):0)) { */
+               /* XXX (obedit && obedit->actcol) ? (obedit->actcol-1) : 0)) { */
                if (totvert && (tot = BLI_scanfill_calc(&sf_ctx, BLI_SCANFILL_CALC_REMOVE_DOUBLES | BLI_SCANFILL_CALC_HOLES))) {
                        if (tot) {
                                dlnew = MEM_callocN(sizeof(DispList), "filldisplist");
index 03df0c289446b2e1e1eb672c931a98908868c071..dba2fd5070690d7eb6de2f9f9ab1a9705b00f8be 100644 (file)
@@ -1489,7 +1489,7 @@ void BKE_mesh_from_nurbs_displist(Object *ob, ListBase *dispbase, int use_orco_u
        if (dm == NULL) {
                if (BKE_mesh_nurbs_displist_to_mdata(ob, dispbase, &allvert, &totvert,
                                                     &alledge, &totedge, &allloop,
-                                                    &allpoly, (use_orco_uv)? &alluv: NULL,
+                                                    &allpoly, (use_orco_uv) ? &alluv : NULL,
                                                     &totloop, &totpoly) != 0)
                {
                        /* Error initializing */
index 9a0b1a769881ad981f2e70ea86b6d579ddc86885..666c85d2f6bb9acfaabb2c95b36e09a0b5bfac02 100644 (file)
@@ -770,7 +770,7 @@ static void pbvh_bmesh_collapse_edge(PBVH *bvh, BMEdge *e, BMVert *v1,
        BM_edge_kill(bvh->bm, e);
 
        /* For all remaining faces of v2, create a new face that is the
-          same except it uses v1 instead of v2 */
+        * same except it uses v1 instead of v2 */
        /* Note: this could be done with BM_vert_splice(), but that
         * requires handling other issues like duplicate edges, so doesn't
         * really buy anything. */
index 9e8cf985f71693590cc4132430f4d839c626d2b5..4ac9312d57d40b985af65a7281d7d75e34143b2a 100644 (file)
@@ -1065,7 +1065,7 @@ static void scene_depsgraph_hack(Scene *scene, Scene *scene_parent)
                
                if (ob->depsflag) {
                        int recalc = 0;
-                       // printf("depshack %s\n", ob->id.name+2);
+                       // printf("depshack %s\n", ob->id.name + 2);
                        
                        if (ob->depsflag & OB_DEPS_EXTRA_OB_RECALC)
                                recalc |= OB_RECALC_OB;
index fc1d0e99a30983e9576bbfaee1936c278a36da07..70a02544acf13ad6bd0a6062a16c3ac73619cc3a 100644 (file)
@@ -2378,7 +2378,7 @@ void interp_weights_poly_v3(float *w, float v[][3], const int n, const float co[
                t2 = mean_value_half_tan_v3(co, vmid, vnext);
 
                len = len_v3v3(co, vmid);
-               w[i] = (len != 0.0f)? (t1 + t2) / len: 0.0f;
+               w[i] = (len != 0.0f) ? (t1 + t2) / len: 0.0f;
                totweight += w[i];
        }
 
@@ -2430,7 +2430,7 @@ void interp_weights_poly_v2(float *w, float v[][2], const int n, const float co[
                t2 = mean_value_half_tan_v2(co, vmid, vnext);
 
                len = len_v2v2(co, vmid);
-               w[i] = (len != 0.0f)? (t1 + t2) / len: 0.0f;
+               w[i] = (len != 0.0f) ? (t1 + t2) / len: 0.0f;
                totweight += w[i];
        }
 
index d82cd6787874efeb33eb0256d9fbcf929d4c9981..e60ce562c6c29ad6253425ec706baa1fc2e860f4 100644 (file)
@@ -518,7 +518,7 @@ static int bev_ccw_test(BMEdge *a, BMEdge *b, BMFace *f)
  * We want M to make M*A=B where A has the left side above, as columns
  * and B has the right side as columns - both extended into homogeneous coords.
  * So M = B*(Ainverse).  Doing Ainverse by hand gives the code below.
-*/
+ */
 static int make_unit_square_map(const float va[3], const float vmid[3], const float vb[3],
                                 float r_mat[4][4])
 {
@@ -1304,7 +1304,7 @@ static void fix_vmesh_tangents(VMesh *vm, BevVert *bv)
 
                /* Also want (i, 1, k) snapped to plane of adjacent face for
                 * 1 < k < ns - 1, but current initial cage and subdiv rules
-                 * ensure this, so nothing to do */
+                * ensure this, so nothing to do */
        } while ((bndv = bndv->next) != vm->boundstart);
 }
 
index 6f620ff7947cdebdb306bef787a380731bc1a125..e3b56208aeb6fb53f0ccbd8c4e6df5a124238cf1 100644 (file)
@@ -184,7 +184,7 @@ void SceneExporter::writeNodes(Object *ob, Scene *sce)
 
        if (ob->constraints.first != NULL ){
                bConstraint *con = (bConstraint*) ob->constraints.first;
-               while(con){
+               while (con) {
                        std::string con_name(id_name(con));
                        std::string con_tag = con_name + "_constraint";
                        colladaNode.addExtraTechniqueChildParameter("blender",con_tag,"type",con->type);
index 8165417f21dca3e08b8d96ccb51ffa10469858f4..913c0710cc6b8aa09d0fe44f89b4427704052e13 100644 (file)
@@ -45,13 +45,13 @@ void TransformReader::get_node_mat(float mat[4][4], COLLADAFW::Node *node, std::
 
                COLLADAFW::Transformation *tm = node->getTransformations()[i];
                COLLADAFW::Transformation::TransformationType type = tm->getTransformationType();
-        
-               if(type == COLLADAFW::Transformation::MATRIX){
+
+               if (type == COLLADAFW::Transformation::MATRIX){
                        // XXX why does this return and discard all following transformations?
                        dae_matrix_to_mat4(tm, mat);
                        return;
                }
-               else{                   
+               else {
                        switch (type) {
                                case COLLADAFW::Transformation::TRANSLATE:
                                        dae_translate_to_mat4(tm, cur);
index ef1b73fc58fc86d710fcb64acc7ee90c6c56bf74..ccd8309f794dcd4a2fc12bf433b9c42c5055427c 100644 (file)
@@ -146,16 +146,15 @@ int ED_markers_post_apply_transform(ListBase *markers, Scene *scene, int mode, f
                                                marker->frame += (int)floorf(value + 0.5f);
                                                changed++;
                                        }
+                                       break;
                                }
-                               break;
-                                       
                                case TFM_TIME_SCALE:
                                {
                                        /* rescale the distance between the marker and the current frame */
                                        marker->frame = cfra + (int)floorf(((float)(marker->frame - cfra) * value) + 0.5f);
                                        changed++;
+                                       break;
                                }
-                               break;
                        }
                }
        }
index 1dee497ff11fa3ed6dbab3c0dee12a639fcb101a..589ff3e1951553ff9a09b18878d27bd0dfe56aee 100644 (file)
@@ -997,7 +997,7 @@ void ui_fontscale(short *points, float aspect)
 /* project button or block (but==NULL) to pixels in regionspace */
 static void ui_but_to_pixelrect(rcti *rect, const ARegion *ar, uiBlock *block, uiBut *but)
 {
-       rctf rectf = (but)? but->rect: block->rect;
+       rctf rectf = (but) ? but->rect : block->rect;
        
        ui_block_to_window_fl(ar, block, &rectf.xmin, &rectf.ymin);
        ui_block_to_window_fl(ar, block, &rectf.xmax, &rectf.ymax);
index 3a4a6442fd615c813eb2e08e1116e1280099737d..e4c163e9162f7e48ee8cc8c9908dbdfa5d7f712a 100644 (file)
@@ -59,7 +59,7 @@ static FCurve *ui_but_get_fcurve(uiBut *but, bAction **action, int *driven)
 {
        /* for entire array buttons we check the first component, it's not perfect
         * but works well enough in typical cases */
-       int rnaindex = (but->rnaindex == -1)? 0: but->rnaindex;
+       int rnaindex = (but->rnaindex == -1) ? 0 : but->rnaindex;
 
        return rna_get_fcurve(&but->rnapoin, but->rnaprop, rnaindex, action, driven);
 }
index e7f5e57552c6bac9c8c294181221e3b089491a8c..2ace91b5e053b1cc3f3be6e025781c3b728fbcc1 100644 (file)
@@ -3598,8 +3598,8 @@ static void SCENE_OT_delete(wmOperatorType *ot)
 /* ***************** region alpha blending ***************** */
 
 /* implementation note: a disapplearing region needs at least 1 last draw with 100% backbuffer
-    texture over it- then triple buffer will clear it entirely. 
   This because flag RGN_HIDDEN is set in end - region doesnt draw at all then */
+ * texture over it- then triple buffer will clear it entirely.
* This because flag RGN_HIDDEN is set in end - region doesnt draw at all then */
 
 typedef struct RegionAlphaInfo {
        ScrArea *sa;
index c60097e20ebed663c85bed6b1619aca90b970e3e..74399857a97095d359bf1cd10bae91f205d5e77a 100644 (file)
@@ -4347,7 +4347,7 @@ static int project_paint_sub_stroke(ProjPaintState *ps, BrushPainter *painter, c
        pos[1] = (float)(mval_i[1]);
        
        // we may want to use this later 
-       // BKE_brush_painter_require_imbuf(painter, ((ibuf->rect_float)? 1: 0), 0, 0);
+       // BKE_brush_painter_require_imbuf(painter, ((ibuf->rect_float) ? 1 : 0), 0, 0);
        
        if (BKE_brush_painter_paint(painter, project_paint_op, pos, time, pressure, ps, 0)) {
                return 1;
index 915036cf70efe597b3ec2f73665e5efeb788b67d..00bc3d1d26b19acecb700cb60b79c4cae74d0b2d 100644 (file)
@@ -425,11 +425,11 @@ static void sima_draw_alpha_pixelsf(float x1, float y1, int rectx, int recty, fl
        MEM_freeN(trectf);
        /* ogl trick below is slower... (on ATI 9600) */
 //     glColorMask(1, 0, 0, 0);
-//     glaDrawPixelsSafe(x1, y1, rectx, recty, rectx, GL_RGBA, GL_FLOAT, rectf+3);
+//     glaDrawPixelsSafe(x1, y1, rectx, recty, rectx, GL_RGBA, GL_FLOAT, rectf + 3);
 //     glColorMask(0, 1, 0, 0);
-//     glaDrawPixelsSafe(x1, y1, rectx, recty, rectx, GL_RGBA, GL_FLOAT, rectf+2);
+//     glaDrawPixelsSafe(x1, y1, rectx, recty, rectx, GL_RGBA, GL_FLOAT, rectf + 2);
 //     glColorMask(0, 0, 1, 0);
-//     glaDrawPixelsSafe(x1, y1, rectx, recty, rectx, GL_RGBA, GL_FLOAT, rectf+1);
+//     glaDrawPixelsSafe(x1, y1, rectx, recty, rectx, GL_RGBA, GL_FLOAT, rectf + 1);
 //     glColorMask(1, 1, 1, 1);
 }
 
index a087ff65f637837b65993c4d01de8d70326c530a..41641c8018882118b36566a1628a928bcc2707de 100644 (file)
@@ -1309,8 +1309,8 @@ static void do_outliner_keyingset_editop(SpaceOops *soops, KeyingSet *ks, ListBa
                                                 * for now, we don't supply one, and just let this use the KeyingSet name */
                                                BKE_keyingset_add_path(ks, id, NULL, path, array_index, flag, groupmode);
                                                ks->active_path = BLI_countlist(&ks->paths);
+                                               break;
                                        }
-                                       break;
                                        case KEYINGSET_EDITMODE_REMOVE:
                                        {
                                                /* find the relevant path, then remove it from the KeyingSet */
@@ -1322,8 +1322,8 @@ static void do_outliner_keyingset_editop(SpaceOops *soops, KeyingSet *ks, ListBa
 
                                                        ks->active_path = 0;
                                                }
+                                               break;
                                        }
-                                       break;
                                }
                                
                                /* free path, since it had to be generated */
index 2e34de6c5683a44eca5e93599d564a97a25e3523..dd1510498b023591f2d90c86eb58620300759984 100644 (file)
@@ -238,7 +238,7 @@ static void InputAngle(TransInfo *UNUSED(t), MouseInput *mi, const int mval[2],
        double deler = (((dx1 * dx1 + dy1 * dy1) +
                         (dx2 * dx2 + dy2 * dy2) -
                         (dx3 * dx3 + dy3 * dy3)) / (2.0 * ((A * B) ? (A * B) : 1.0)));
-       /* ((A*B)?(A*B):1.0) this takes care of potential divide by zero errors */
+       /* ((A * B) ? (A * B) : 1.0) this takes care of potential divide by zero errors */
 
        float dphi;
 
index b1bb5c85e50188479725f47227cbb3e02573be69..1b43d829947457f7d3863a88eda7cff629ad861d 100644 (file)
@@ -650,7 +650,7 @@ static void stitch_uv_edge_generate_linked_edges(GHash *edge_hash, StitchState *
                                                edge2 = BLI_ghash_lookup(edge_hash, &edgetmp);
 
                                                /* here I am taking care of non manifold case, assuming more than two matching edges.
-                                                        * I am not too sure we want this though */
+                                                * I am not too sure we want this though */
                                                last_set->next = edge2;
                                                last_set = edge2;
                                                /* set first, similarly to uv elements. Now we can iterate among common edges easily */
index 41c47f8de1593630a94babf0ae8389f5b9463f4f..62d696ec255a75764057e8a5d7106d17c09dcb61 100644 (file)
@@ -164,7 +164,7 @@ typedef enum BrushSculptTool {
 } BrushSculptTool;
 
 /* ImagePaintSettings.tool */
-typedef enum BrushImagePaintTool{
+typedef enum BrushImagePaintTool {
        PAINT_TOOL_DRAW = 0,
        PAINT_TOOL_SOFTEN = 1,
        PAINT_TOOL_SMEAR = 2,
index 41b6e3e5ca634b7481b398d5b72d0b5527c6dd30..01df05677e700940cb4879bad4acc7b9ee530a98 100644 (file)
@@ -3427,7 +3427,7 @@ static const char *cpp_classes = ""
 "namespace BL {\n"
 "\n"
 "#define BOOLEAN_PROPERTY(sname, identifier) \\\n"
-"      inline bool sname::identifier(void) { return sname##_##identifier##_get(&ptr)? true: false; } \\\n"
+"      inline bool sname::identifier(void) { return sname##_##identifier##_get(&ptr) ? true: false; } \\\n"
 "      inline void sname::identifier(int value) { sname##_##identifier##_set(&ptr, value); }\n"
 "\n"
 "#define BOOLEAN_ARRAY_PROPERTY(sname, size, identifier) \\\n"
@@ -3586,7 +3586,7 @@ static const char *cpp_classes = ""
 "public:\n"
 "      Pointer(const PointerRNA &p) : ptr(p) { }\n"
 "      operator const PointerRNA&() { return ptr; }\n"
-"      bool is_a(StructRNA *type) { return RNA_struct_is_a(ptr.type, type)? true: false; }\n"
+"      bool is_a(StructRNA *type) { return RNA_struct_is_a(ptr.type, type) ? true: false; }\n"
 "      operator void*() { return ptr.data; }\n"
 "      operator bool() { return ptr.data != NULL; }\n"
 "\n"
index 21aed20ccc3e80d95294ae5b2ded4c8a16c4fbff..8f8136b0a2880d5e5c5062107f582042f0ae06b3 100644 (file)
@@ -460,7 +460,7 @@ static void rna_Curve_body_set(PointerRNA *ptr, const char *value)
        /* don't know why this is +4, just duplicating load_editText() */
        cu->strinfo = MEM_callocN((len + 4) * sizeof(CharInfo), "strinfo");
 
-       /*BLI_strncpy_wchar_as_utf8(cu->str, value, len+1);  *//* value is not wchar_t */
+       /*BLI_strncpy_wchar_as_utf8(cu->str, value, len + 1);  *//* value is not wchar_t */
        BLI_strncpy(cu->str, value, len + 1);
 }
 
index f7daf6a3b0618441d40a7074ff8ba5e8cc521007..d699e8ae0bbe5ecf28d26dffe3454b01a3254070 100644 (file)
@@ -413,7 +413,7 @@ static void rna_Sequence_name_set(PointerRNA *ptr, const char *value)
        /* fix all the animation data which may link to this */
 
        /* don't rename everywhere because these are per scene */
-       /* BKE_all_animdata_fix_paths_rename(NULL, "sequence_editor.sequences_all", oldname, seq->name+2); */
+       /* BKE_all_animdata_fix_paths_rename(NULL, "sequence_editor.sequences_all", oldname, seq->name + 2); */
        adt = BKE_animdata_from_id(&scene->id);
        if (adt)
                BKE_animdata_fix_paths_rename(&scene->id, adt, NULL, "sequence_editor.sequences_all", oldname, seq->name + 2, 0, 0, 1);
index a54a8507882103d5027c1241aaee45f30b884e94..bfeeb7ddc997643096c8bd2b915a19e59fccb331 100644 (file)
 
 
 /* ******************* Channel Matte Node ********************************* */
-static bNodeSocketTemplate cmp_node_channel_matte_in[] ={
+static bNodeSocketTemplate cmp_node_channel_matte_in[] = {
        {SOCK_RGBA, 1, N_("Image"), 1.0f, 1.0f, 1.0f, 1.0f},
        {-1, 0, ""}
 };
 
-static bNodeSocketTemplate cmp_node_channel_matte_out[] ={
+static bNodeSocketTemplate cmp_node_channel_matte_out[] = {
        {SOCK_RGBA, 0, N_("Image")},
        {SOCK_FLOAT, 0, N_("Matte")},
        {-1, 0, ""}
index dc8d427c0ae84151344b52ee56cbc23ad74e06c0..d59061dfc0a2aba9571889dee77c96f05a1c8cd2 100644 (file)
@@ -197,7 +197,7 @@ void node_group_remove_socket(bNodeTree *ngroup, bNodeSocket *gsock, int in_out)
 /* groups display their internal tree name as label */
 const char *node_group_label(bNode *node)
 {
-       return (node->id)? node->id->name+2: IFACE_("Missing Datablock");
+       return (node->id)? node->id->name + 2: IFACE_("Missing Datablock");
 }
 
 int node_group_valid(bNodeTree *ntree, bNodeTemplate *ntemp)
index f567e36cc1947872bae4596c0705a8e39803f2e2..3eb2cdc8ab79eed67c1418181ebfd87c00d24f9c 100644 (file)
@@ -277,7 +277,7 @@ void ntreeExecGPUNodes(bNodeTreeExec *exec, GPUMaterial *mat, int do_outputs)
        bNodeStack *stack;
        bNodeStack *nsin[MAX_SOCKET];   /* arbitrary... watch this */
        bNodeStack *nsout[MAX_SOCKET];  /* arbitrary... watch this */
-       GPUNodeStack gpuin[MAX_SOCKET+1], gpuout[MAX_SOCKET+1];
+       GPUNodeStack gpuin[MAX_SOCKET + 1], gpuout[MAX_SOCKET + 1];
        int do_it;
 
        stack= exec->stack;
index d4451d570a46470443dfd043bc17ae1990295ba5..0ac88c3f5b0a043328e7b6cd2c397b329b1d171d 100644 (file)
@@ -734,8 +734,8 @@ static void bake_single_vertex(BakeShade *bs, VertRen *vert, float u, float v)
 }
 
 /* Bake all vertices of a face. Actually, this still works on a face-by-face
  basis, and each vertex on each face is shaded. Vertex colors are a property
  of loops, not vertices. */
* basis, and each vertex on each face is shaded. Vertex colors are a property
* of loops, not vertices. */
 static void shade_verts(BakeShade *bs)
 {
        VlakRen *vlr = bs->vlr;
@@ -756,7 +756,7 @@ static void shade_verts(BakeShade *bs)
        zero_v3(bs->dyco);
 
        /* Shade each vertex of the face. u and v are barycentric coordinates; since
-          we're only interested in vertices, these will be 0 or 1. */
+        * we're only interested in vertices, these will be 0 or 1. */
        if ((vlr->flag & R_FACE_SPLIT) == 0) {
                /* Processing triangle face, whole quad, or first half of split quad. */
 
index 4a95c6ac091cce9d5fdb3f565fd2f1cc9bce788c..9e3722777ba7f9f32e9431d37101809bc0ccf744 100644 (file)
@@ -282,7 +282,7 @@ void wm_event_do_notifiers(bContext *C)
                                /* XXX context in notifiers? */
                                CTX_wm_window_set(C, win);
 
-                               /* printf("notifier win %d screen %s cat %x\n", win->winid, win->screen->id.name+2, note->category); */
+                               /* printf("notifier win %d screen %s cat %x\n", win->winid, win->screen->id.name + 2, note->category); */
                                ED_screen_do_listen(C, note);
 
                                for (ar = win->screen->regionbase.first; ar; ar = ar->next) {
@@ -1383,8 +1383,8 @@ static void wm_event_modalkeymap(const bContext *C, wmOperator *op, wmEvent *eve
        }
        else {
                /* modal keymap checking returns handled events fine, but all hardcoded modal
-                  handling typically swallows all events (OPERATOR_RUNNING_MODAL).
-                  This bypass just disables support for double clicks in hardcoded modal handlers */
+                * handling typically swallows all events (OPERATOR_RUNNING_MODAL).
+                * This bypass just disables support for double clicks in hardcoded modal handlers */
                if (event->val == KM_DBL_CLICK) {
                        event->prevval = event->val;
                        event->val = KM_PRESS;
index 7916d34bf135c04ef7a4e6d717828bdecdb45e29..af1d9c544e448437d2f46061b96b8f9c96edcb21 100644 (file)
@@ -921,7 +921,7 @@ static int set_ge_parameters(int argc, const char **argv, void *data)
                        }
 
 
-               } /* if (*(argv[a+1]) == '=') */
+               } /* if (*(argv[a + 1]) == '=') */
        }
 
        return a;