style cleanup
authorCampbell Barton <ideasman42@gmail.com>
Mon, 25 Jun 2012 07:24:48 +0000 (07:24 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 25 Jun 2012 07:24:48 +0000 (07:24 +0000)
doc/python_api/examples/bpy.types.Mesh.py
source/blender/blenkernel/intern/dynamicpaint.c
source/blender/blenkernel/intern/library.c
source/blender/blenkernel/intern/particle.c
source/blender/blenlib/BLI_array.h
source/blender/editors/object/object_edit.c
source/blender/editors/space_sequencer/sequencer_select.c
source/blender/modifiers/intern/MOD_mask.c
source/blender/python/intern/stubs.c
source/blender/render/intern/source/render_texture.c
source/blenderplayer/bad_level_call_stubs/stubs.c

index d30303f3b0515d08bada77807bfc2c09f265dbe3..19ccd177d64915cd056a48ce20adc1140d85efc4 100644 (file)
@@ -17,7 +17,7 @@ Each polygon reference a slice in the loop array, this way, polygons do not stor
 only a reference to loops that the polygon uses.
 
 :class:`Mesh.loops`, :class:`Mesh.uv_layers` :class:`Mesh.vertex_colors` are all aligned so the same polygon loop
-indicies can be used to find the UV's and vertex colors as with as the vertices.
+indices can be used to find the UV's and vertex colors as with as the vertices.
 
 To compare mesh API options see: :ref:`NGons and Tessellation Faces <info_gotcha_mesh_faces>`
 
index eb5e4e4f8b5ebda2dada4dd9bf75fbc5365685f9..6589b1e108296f8339d5a63305d2c06623793907 100644 (file)
@@ -734,7 +734,7 @@ static void surfaceGenerateGrid(struct DynamicPaintSurface *surface)
 
                /* deactivate zero axises */
                for (i = 0; i < 3; i++) {
-                       if (td[i] < min_dim) {td[i] = 1.0f; axis -= 1; }
+                       if (td[i] < min_dim) { td[i] = 1.0f; axis -= 1; }
                }
 
                if (axis == 0 || MAX3(td[0], td[1], td[2]) < 0.0001f) {
@@ -2016,11 +2016,11 @@ static int dynamicPaint_findNeighbourPixel(PaintUVPoint *tempPoints, DerivedMesh
 
                        /* Dist to second edge  */
                        t_dist = dist_to_line_segment_v2(pixel, tface[cPoint->face_index].uv[uindex[1]], tface[cPoint->face_index].uv[uindex[2]]);
-                       if (t_dist < dist) {e1_index = cPoint->v2; e2_index = cPoint->v3; edge1_index = uindex[1]; edge2_index = uindex[2]; dist = t_dist; }
+                       if (t_dist < dist) { e1_index = cPoint->v2; e2_index = cPoint->v3; edge1_index = uindex[1]; edge2_index = uindex[2]; dist = t_dist; }
 
                        /* Dist to third edge   */
                        t_dist = dist_to_line_segment_v2(pixel, tface[cPoint->face_index].uv[uindex[2]], tface[cPoint->face_index].uv[uindex[0]]);
-                       if (t_dist < dist) {e1_index = cPoint->v3; e2_index = cPoint->v1;  edge1_index = uindex[2]; edge2_index = uindex[0]; dist = t_dist; }
+                       if (t_dist < dist) { e1_index = cPoint->v3; e2_index = cPoint->v1;  edge1_index = uindex[2]; edge2_index = uindex[0]; dist = t_dist; }
 
 
                        /*
@@ -2284,7 +2284,7 @@ int dynamicPaint_createUVSurface(DynamicPaintSurface *surface)
                                                u = (dot11 * dot02 - dot01 * dot12) * invDenom;
                                                v = (dot00 * dot12 - dot01 * dot02) * invDenom;
 
-                                               if ((u > 0) && (v > 0) && (u + v < 1)) {isInside = 1; } /* is inside a triangle */
+                                               if ((u > 0) && (v > 0) && (u + v < 1)) { isInside = 1; } /* is inside a triangle */
 
                                                /*  If collision wasn't found but the face is a quad
                                                 *      do another check for the second half */
@@ -2304,7 +2304,7 @@ int dynamicPaint_createUVSurface(DynamicPaintSurface *surface)
                                                        u = (dot11 * dot02 - dot01 * dot12) * invDenom;
                                                        v = (dot00 * dot12 - dot01 * dot02) * invDenom;
 
-                                                       if ((u > 0) && (v > 0) && (u + v < 1)) {isInside = 2; } /* is inside the second half of the quad */
+                                                       if ((u > 0) && (v > 0) && (u + v < 1)) { isInside = 2; } /* is inside the second half of the quad */
 
                                                }
 
@@ -2583,7 +2583,7 @@ void dynamicPaint_outputSurfaceImage(DynamicPaintSurface *surface, char *filenam
        int format = (surface->image_fileformat & MOD_DPAINT_IMGFORMAT_OPENEXR) ? R_IMF_IMTYPE_OPENEXR : R_IMF_IMTYPE_PNG;
        char output_file[FILE_MAX];
 
-       if (!sData || !sData->type_data) {setError(surface->canvas, "Image save failed: Invalid surface."); return; }
+       if (!sData || !sData->type_data) { setError(surface->canvas, "Image save failed: Invalid surface."); return; }
        /* if selected format is openexr, but current build doesnt support one */
        #ifndef WITH_OPENEXR
        if (format == R_IMF_IMTYPE_OPENEXR) format = R_IMF_IMTYPE_PNG;
@@ -2597,7 +2597,7 @@ void dynamicPaint_outputSurfaceImage(DynamicPaintSurface *surface, char *filenam
 
        /* Init image buffer    */
        ibuf = IMB_allocImBuf(surface->image_resolution, surface->image_resolution, 32, IB_rectfloat);
-       if (ibuf == NULL) {setError(surface->canvas, "Image save failed: Not enough free memory."); return; }
+       if (ibuf == NULL) { setError(surface->canvas, "Image save failed: Not enough free memory."); return; }
 
        #pragma omp parallel for schedule(static)
        for (index = 0; index < sData->total_points; index++) {
@@ -3287,7 +3287,7 @@ static int dynamicPaint_paintMesh(DynamicPaintSurface *surface,
                                                                        int v1 = mface[hit.index].v1, v2 = mface[hit.index].v2, v3 = mface[hit.index].v3, quad = (hit.no[0] == 1.0f);
                                                                        float dot;
 
-                                                                       if (quad) {v2 = mface[hit.index].v3; v3 = mface[hit.index].v4; }
+                                                                       if (quad) { v2 = mface[hit.index].v3; v3 = mface[hit.index].v4; }
                                                                        normal_tri_v3(hit.no, mvert[v1].co, mvert[v2].co, mvert[v3].co);
                                                                        dot = ray_dir[0] * hit.no[0] + ray_dir[1] * hit.no[1] + ray_dir[2] * hit.no[2];
 
@@ -3580,7 +3580,7 @@ static int dynamicPaint_paintParticles(DynamicPaintSurface *surface,
 
                /*      for debug purposes check if any NAN particle proceeds
                 *      For some reason they get past activity check, this should rule most of them out */
-               if (isnan(pa->state.co[0]) || isnan(pa->state.co[1]) || isnan(pa->state.co[2])) {invalidParticles++; continue; }
+               if (isnan(pa->state.co[0]) || isnan(pa->state.co[1]) || isnan(pa->state.co[2])) { invalidParticles++; continue; }
 
                /* make sure particle is close enough to canvas */
                if (!boundIntersectPoint(&grid->grid_bounds, pa->state.co, range)) continue;
@@ -3953,7 +3953,7 @@ void surface_determineForceTargetPoints(PaintSurfaceData *sData, int index, floa
                int n_index = sData->adj_data->n_index[index] + i;
                float dir_dot = dot_v3v3(bNeighs[n_index].dir, force);
 
-               if (dir_dot > closest_d[0] && dir_dot > 0.0f) {closest_d[0] = dir_dot; closest_id[0] = n_index; }
+               if (dir_dot > closest_d[0] && dir_dot > 0.0f) { closest_d[0] = dir_dot; closest_id[0] = n_index; }
        }
 
        if (closest_d[0] < 0.0f) return;
index c81e607ce93aa5c11604394f65001d686a32ad00..6e6891684c9ec549d168b11cb36d28535efddf7b 100644 (file)
@@ -1321,7 +1321,7 @@ void clear_id_newpoins(void)
        }
 }
 
-#define LIBTAG(a)   if (a && a->id.lib) {a->id.flag &= ~LIB_INDIRECT; a->id.flag |= LIB_EXTERN; } (void)0
+#define LIBTAG(a)   if (a && a->id.lib) { a->id.flag &= ~LIB_INDIRECT; a->id.flag |= LIB_EXTERN; } (void)0
 
 static void lib_indirect_test_id(ID *id, Library *lib)
 {
index 9537a31838cce65560c1dd19e87b6637e51aa0f8..a1fe1f7b8a9d77c839609f363f8cbf1cfb8190d4 100644 (file)
@@ -3752,7 +3752,7 @@ static int get_particle_uv(DerivedMesh *dm, ParticleData *pa, int face_index, co
 }
 
 #define SET_PARTICLE_TEXTURE(type, pvalue, texfac)  \
-       if ((event & mtex->mapto) & type) {pvalue = texture_value_blend(def, pvalue, value, texfac, blend); } (void)0
+       if ((event & mtex->mapto) & type) { pvalue = texture_value_blend(def, pvalue, value, texfac, blend); } (void)0
 
 #define CLAMP_PARTICLE_TEXTURE_POS(type, pvalue)  \
        if (event & type) { if (pvalue < 0.0f) pvalue = 1.0f + pvalue; CLAMP(pvalue, 0.0f, 1.0f); } (void)0
index 4fbed23d5e693d82452d0f16e6d37ec51b7ae866..182580145298a48cd2211d7981cc7383ce682f68 100644 (file)
  * ***** END GPL LICENSE BLOCK *****
  */
 
-/*
+/** \file BLI_array.h
+ *  \ingroup bli
+ *  \brief A macro array library.
+ *
  * this library needs to be changed to not use macros quite so heavily,
  * and to be more of a complete array API.  The way arrays are
  * exposed to client code as normal C arrays is very useful though, imho.
 /* grow an array by a specified number of items */
 #define BLI_array_grow_items(arr, num)  (                                     \
        ((void *)(arr) == NULL && (void *)(_##arr##_static) != NULL) ?            \
-           ((arr = (void *)_##arr##_static), (_##arr##_count += num)) :           \
+           ((arr = (void *)_##arr##_static), (_##arr##_count += num)) :          \
            _bli_array_grow_items(arr, num)                                       \
 )
 
                MEM_mallocN(sizeof(*(arr)) * (realsize), allocstr)                \
            )                                                                     \
 
-#define BLI_array_fixedstack_free(arr)                                        \
-       if (_##arr##_is_static) MEM_freeN(arr)                                    \
-
+#define BLI_array_fixedstack_free(arr)  \
+       if (_##arr##_is_static) MEM_freeN(arr)
index 908c0a6f4f2f6adc0739e59de4486c73815a0c3c..35ee641d2c18874f29729eef70b5596974d81a5f 100644 (file)
 /* ************* XXX **************** */
 static void error(const char *UNUSED(arg)) {}
 static void waitcursor(int UNUSED(val)) {}
-static int pupmenu(const char *UNUSED(msg)) {return 0;}
+static int pupmenu(const char *UNUSED(msg)) { return 0; }
 
 /* port over here */
 static void error_libdata(void) {}
index b03edfc61b906bc5434d4c986a2c163e932c1024..a55f0edc06cad0973bc92c8ee50a6b1fe4d2e3c5 100644 (file)
@@ -587,14 +587,14 @@ static int select_more_less_seq__internal(Scene *scene, int sel, int linked)
                                /* only get unselected nabours */
                                neighbor = find_neighboring_sequence(scene, seq, SEQ_SIDE_LEFT, isel);
                                if (neighbor) {
-                                       if (sel) {neighbor->flag |= SELECT; recurs_sel_seq(neighbor); }
+                                       if (sel) { neighbor->flag |= SELECT; recurs_sel_seq(neighbor); }
                                        else neighbor->flag &= ~SELECT;
                                        if (linked == 0) neighbor->tmp = (Sequence *)1;
                                        change = 1;
                                }
                                neighbor = find_neighboring_sequence(scene, seq, SEQ_SIDE_RIGHT, isel);
                                if (neighbor) {
-                                       if (sel) {neighbor->flag |= SELECT; recurs_sel_seq(neighbor); }
+                                       if (sel) { neighbor->flag |= SELECT; recurs_sel_seq(neighbor); }
                                        else neighbor->flag &= ~SELECT;
                                        if (linked == 0) neighbor->tmp = (void *)1;
                                        change = 1;
index 5039ffef382cfd1b8aa4660e52a60d18b11ac6bb..ab7263a1b5331ba5b6c9c62cf975700088bf3260 100644 (file)
@@ -178,7 +178,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
                        return derivedData;
                }
                
-               /* verthash gives mapping from original vertex indicies to the new indices (including selected matches only)
+               /* verthash gives mapping from original vertex indices to the new indices (including selected matches only)
                 *      key=oldindex, value=newindex 
                 */
                vertHash = BLI_ghash_int_new("mask vert gh");
index ab43b518085529d9b3da469f548f3395ef0c7778..50d2e88f210cf672731170171448d4a89ae9d8b9 100644 (file)
@@ -35,5 +35,5 @@
 //void BPY_text_free_code(void) {}
 void BPY_pyconstraint_exec(void) {}
 void BPY_pyconstraint_target(void) {}
-int BPY_is_pyconstraint(void) {return 0;}
+int BPY_is_pyconstraint(void) { return 0;}
 void BPY_pyconstraint_update(void) {}
index e2a4ef1dca87678e2a54601d443e9a507c59e072..39577bf8da8201ea3195f4a445a2a3d34f80182f 100644 (file)
@@ -3591,7 +3591,7 @@ void RE_sample_material_color(Material *mat, float color[3], float *alpha, const
 
        if (!mvert || !mface || !mat) return;
        v1=mface[face_index].v1, v2=mface[face_index].v2, v3=mface[face_index].v3;
-       if (hit_quad) {v2=mface[face_index].v3; v3=mface[face_index].v4;}
+       if (hit_quad) { v2 = mface[face_index].v3; v3 = mface[face_index].v4; }
        normal_tri_v3(normal, mvert[v1].co, mvert[v2].co, mvert[v3].co);
 
        /* generate shadeinput with data required */
index b82f2f7f2706b3c188f84b7959dd0aaac19510f7..97fb94351809cd1ac57cbc19473299a1cc876a1e 100644 (file)
@@ -506,7 +506,7 @@ struct DualConMesh *dualcon(const struct DualConMesh *input_mesh,
                             float threshold,
                             float hermite_num,
                             float scale,
-                            int depth) {return 0;}
+                            int depth) { return 0; }
 
 /* intern/cycles */
 struct CCLDeviceInfo;