cleanup: style/indentation
authorCampbell Barton <ideasman42@gmail.com>
Wed, 11 Feb 2015 07:38:41 +0000 (18:38 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 11 Feb 2015 07:39:28 +0000 (18:39 +1100)
23 files changed:
source/blender/blenkernel/intern/movieclip.c
source/blender/blenkernel/intern/seqeffects.c
source/blender/blenkernel/intern/softbody.c
source/blender/blenlib/intern/noise.c
source/blender/bmesh/tools/bmesh_bevel.c
source/blender/compositor/intern/COM_MemoryBuffer.cpp
source/blender/editors/mesh/editmesh_tools.c
source/blender/editors/mesh/meshtools.c
source/blender/editors/render/render_internal.c
source/blender/editors/screen/screen_edit.c
source/blender/editors/sound/sound_ops.c
source/blender/editors/space_outliner/outliner_tree.c
source/blender/editors/transform/transform.c
source/blender/editors/uvedit/uvedit_smart_stitch.c
source/blender/freestyle/intern/winged_edge/Curvature.cpp
source/blender/gpu/intern/gpu_buffers.c
source/blender/gpu/intern/gpu_material.c
source/blender/imbuf/intern/divers.c
source/blender/makesdna/DNA_gpencil_types.h
source/blender/makesrna/intern/rna_ui_api.c
source/blender/quicktime/apple/qtkit_export.m
source/blender/render/intern/source/pipeline.c
source/gameengine/Ketsji/KX_MouseActuator.cpp

index 491fb46bd1feaa8786083ecfbd92d1db9eb47461..73f75f4f96d4c293538d6258db6f26a6bc6eb1b1 100644 (file)
@@ -790,10 +790,10 @@ static ImBuf *postprocess_frame(MovieClip *clip, MovieClipUser *user, ImBuf *ibu
        }
 
        if (postprocess_flag) {
-               bool disable_red   = (postprocess_flag & MOVIECLIP_DISABLE_RED) != 0,
-                        disable_green = (postprocess_flag & MOVIECLIP_DISABLE_GREEN) != 0,
-                        disable_blue  = (postprocess_flag & MOVIECLIP_DISABLE_BLUE) != 0,
-                        grayscale     = (postprocess_flag & MOVIECLIP_PREVIEW_GRAYSCALE) != 0;
+               bool disable_red   = (postprocess_flag & MOVIECLIP_DISABLE_RED) != 0;
+               bool disable_green = (postprocess_flag & MOVIECLIP_DISABLE_GREEN) != 0;
+               bool disable_blue  = (postprocess_flag & MOVIECLIP_DISABLE_BLUE) != 0;
+               bool grayscale     = (postprocess_flag & MOVIECLIP_PREVIEW_GRAYSCALE) != 0;
 
                if (disable_red || disable_green || disable_blue || grayscale)
                        BKE_tracking_disable_channels(postproc_ibuf, disable_red, disable_green, disable_blue, 1);
index 11a6cb7acc3d1673e2127d75dd947d823a7e7525..6157d63047ecfc1686b3235e6a0b521d155170d3 100644 (file)
@@ -2670,8 +2670,8 @@ static void do_gaussian_blur_effect_byte(Sequence *seq,
 {
 #define INDEX(_x, _y) (((_y) * (x) + (_x)) * 4)
        GaussianBlurVars *data = seq->effectdata;
-       const int size_x = (int) (data->size_x + 0.5f),
-                 size_y = (int) (data->size_y + 0.5f);
+       const int size_x = (int) (data->size_x + 0.5f);
+       const int size_y = (int) (data->size_y + 0.5f);
        int i, j;
 
        /* Make gaussian weight tabke. */
@@ -2754,8 +2754,8 @@ static void do_gaussian_blur_effect_float(Sequence *seq,
 {
 #define INDEX(_x, _y) (((_y) * (x) + (_x)) * 4)
        GaussianBlurVars *data = seq->effectdata;
-       const int size_x = (int) (data->size_x + 0.5f),
-                 size_y = (int) (data->size_y + 0.5f);
+       const int size_x = (int) (data->size_x + 0.5f);
+       const int size_y = (int) (data->size_y + 0.5f);
        int i, j;
 
        /* Make gaussian weight tabke. */
index 941344cf21ea13c39eba683542c6ae2d18bd5eda..06d0627fd2ca06ebdc0c2dd147ce6581afa422aa 100644 (file)
@@ -1945,7 +1945,7 @@ static int sb_detect_vertex_collisionCached(float opco[3], float facenormal[3],
                                                        float dist;
 
                                                        closest_to_line_segment_v3(ve, opco, nv1, nv2);
-                                                        sub_v3_v3v3(ve, opco, ve);
+                                                       sub_v3_v3v3(ve, opco, ve);
                                                        dist = normalize_v3(ve);
                                                        if ((dist < outerfacethickness)&&(dist < mindistedge )) {
                                                                copy_v3_v3(coledge, ve);
index f002ea54b32b4b4d128497c50152b10609ef111f..5febf720b30046a0b17350678a27dfe4402f8894 100644 (file)
@@ -278,8 +278,8 @@ static float npfade(float t)
 static float grad(int hash_val, float x, float y, float z)
 {
        int h = hash_val & 15;                 /* CONVERT LO 4 BITS OF HASH CODE */
-       float u = h < 8 ? x : y,               /* INTO 12 GRADIENT DIRECTIONS. */
-             v = h < 4 ? y : h == 12 || h == 14 ? x : z;
+       float u = h < 8 ? x : y;               /* INTO 12 GRADIENT DIRECTIONS. */
+       float v = h < 4 ? y : h == 12 || h == 14 ? x : z;
        return ((h & 1) == 0 ? u : -u) + ((h & 2) == 0 ? v : -v);
 }
 
index b25572ed8e23b5d79931a14668c99350eb2a33a9..a418ade6cc14bf52eacfdb70b63676a2405697a3 100644 (file)
@@ -2896,8 +2896,9 @@ static BevVert *bevel_vert_construct(BMesh *bm, BevelParams *bp, BMVert *v)
                        nwire++;
                        /* If edge beveling, exclude wire edges from edges array.
                         * Mark this edge as "chosen" so loop below won't choose it. */
-                        if (!bp->vertex_only)
+                       if (!bp->vertex_only) {
                                BM_BEVEL_EDGE_TAG_ENABLE(bme);
+                       }
                }
        }
        if (!first_bme)
index 37035c50d2c37301626f2553c5da803de5da38c6..9e6e5a423f9d4620cf50b585a4b9cfbc78dff9b2 100644 (file)
@@ -187,11 +187,11 @@ void MemoryBuffer::addPixel(int x, int y, const float color[4])
            y >= this->m_rect.ymin && y < this->m_rect.ymax)
        {
                const int offset = (this->m_width * (y - this->m_rect.ymin) + x - this->m_rect.xmin) * this->m_num_channels;
-                float *dst = &this->m_buffer[offset];
-                const float *src = color;
-                for (int i = 0; i < this->m_num_channels ; i++, dst++, src++) {
-                        *dst += *src;
-                }
+               float *dst = &this->m_buffer[offset];
+               const float *src = color;
+               for (int i = 0; i < this->m_num_channels ; i++, dst++, src++) {
+                       *dst += *src;
+               }
        }
 }
 
index 16b74c3bddd0f3c6d67ae9d06ac8ce7070e47fb6..512784437d60cac8cb9443a627db8885c28ea4a9 100644 (file)
@@ -2745,7 +2745,7 @@ static void mesh_separate_material_assign_mat_nr(Object *ob, const short mat_nr)
                }
 
                if (mat_nr < *totcolp) {
-                        ma_obdata = (*matarar)[mat_nr];
+                       ma_obdata = (*matarar)[mat_nr];
                }
                else {
                        ma_obdata = NULL;
index dee216d9c7324ca11bc919f5705112ca11badb7c..00d79b22e995c330c065ed2b47246e0fe057d26f 100644 (file)
@@ -895,7 +895,7 @@ int ED_mesh_mirror_get_vert(Object *ob, int index)
                index_mirr = eve_mirr ? BM_elem_index_get(eve_mirr) : -1;
        }
        else {
-                index_mirr = mesh_get_x_mirror_vert(ob, index, use_topology);
+               index_mirr = mesh_get_x_mirror_vert(ob, index, use_topology);
        }
 
        return index_mirr;
index b04f1d3e738152c794b81f2d1886f178d843109b..8fcd91b77912f1baa067549aaaea01904a270b72 100644 (file)
@@ -1146,8 +1146,8 @@ BLI_INLINE void rcti_scale_coords(rcti *scaled_rect, const rcti *rect,
 static void render_update_resolution(Render *re, const RenderPreview *rp,
                                      bool use_border, const rcti *clip_rect)
 {
-       int winx = rp->ar->winx / rp->resolution_divider,
-           winy = rp->ar->winy / rp->resolution_divider;
+       int winx = rp->ar->winx / rp->resolution_divider;
+       int winy = rp->ar->winy / rp->resolution_divider;
        if (use_border) {
                rcti scaled_cliprct;
                rcti_scale_coords(&scaled_cliprct, clip_rect,
@@ -1461,7 +1461,7 @@ static void render_view3d_do(RenderEngine *engine, const bContext *C)
        engine->flag &= ~RE_ENGINE_DO_UPDATE;
 }
 
-/* callback for render engine , on changes */
+/* callback for render engine, on changes */
 void render_view3d_update(RenderEngine *engine, const bContext *C)
 {      
        /* this shouldn't be needed and causes too many database rebuilds, but we
index f338fa160f5b4766674f5ad980323046cf2a9c29..deb6c7b4ab2cdd684524334e2165a0e1671539bf 100644 (file)
@@ -2093,7 +2093,7 @@ void ED_update_for_newframe(Main *bmain, Scene *scene, int UNUSED(mute))
        /* this function applies the changes too */
        BKE_scene_update_for_newframe(bmain->eval_ctx, bmain, scene, layers);
        
-       //if ( (CFRA>1) && (!mute) && (scene->r.audio.flag & AUDIO_SCRUB)) 
+       //if ((CFRA > 1) && (!mute) && (scene->r.audio.flag & AUDIO_SCRUB))
        //      audiostream_scrub( CFRA );
        
        /* 3d window, preview */
index 5ce3517696e614b2f13b9d1ae3a0b27c359e1c09..f3c6781b0fa78475a1047ef71df0003359d902fb 100644 (file)
@@ -242,7 +242,7 @@ static int sound_update_animation_flags_exec(bContext *C, wmOperator *UNUSED(op)
        }
        SEQ_END
 
-           fcu = id_data_find_fcurve(&scene->id, scene, &RNA_Scene, "audio_volume", 0, &driven);
+       fcu = id_data_find_fcurve(&scene->id, scene, &RNA_Scene, "audio_volume", 0, &driven);
        if (fcu || driven)
                scene->audio.flag |= AUDIO_VOLUME_ANIMATED;
        else
index abc82775c8d0bf83e18ccf4f4a511702d84deb3c..c956d77d64ae747e49b287eedf186b62b6d018d2 100644 (file)
@@ -828,6 +828,7 @@ static void outliner_add_id_contents(SpaceOops *soops, TreeElement *te, TreeStor
                                outliner_add_element(soops, &te->subtree, gpl, te, TSE_GP_LAYER, a);
                                a++;
                        }
+                       break;
                }
        }
 }
index 2cf8031e43950fec09af6890fbf2b9a516981781..92103c3b29faefa11c9807264a100eb35a589590 100644 (file)
@@ -1503,7 +1503,7 @@ int transformEvent(TransInfo *t, const wmEvent *event)
        if ((t->modifiers   & (MOD_SNAP | MOD_SNAP_INVERT)) !=
            (modifiers_prev & (MOD_SNAP | MOD_SNAP_INVERT)))
        {
-           applyMouseInput(t, &t->mouse, t->mval, t->values);
+               applyMouseInput(t, &t->mouse, t->mval, t->values);
        }
 
        /* Per transform event, if present */
index 4cb1f8943f96be857b4a9efbd517e8d04bfcc27b..f7a8735cccadb41e1ad5d462266e37148ac3881a 100644 (file)
@@ -574,11 +574,11 @@ static void stitch_island_calculate_vert_rotation(UvElement *element, StitchStat
                        edgecos = dot_v2v2(normal, state->normals + index_tmp1 * 2);
                        edgesin = cross_v2v2(normal, state->normals + index_tmp1 * 2);
                        if (edgesin > 0.0f) {
-                           rotation += acosf(max_ff(-1.0f, min_ff(1.0f, edgecos)));
+                               rotation += acosf(max_ff(-1.0f, min_ff(1.0f, edgecos)));
                                rot_elem++;
                        }
                        else {
-                           rotation_neg += acosf(max_ff(-1.0f, min_ff(1.0f, edgecos)));
+                               rotation_neg += acosf(max_ff(-1.0f, min_ff(1.0f, edgecos)));
                                rot_elem_neg++;
                        }
                }
index 3139668842293aed0894e8acab17005a2b9ba22c..97dcc86cf3184472c04033386bbc811041f5295a 100644 (file)
@@ -211,8 +211,9 @@ bool gts_vertex_gaussian_curvature(WVertex *v, real *Kg)
        }
 
        WVertex::incoming_edge_iterator itE;
-       for (itE = v->incoming_edges_begin(); itE != v->incoming_edges_end(); itE++)
-                area += (*itE)->GetaFace()->getArea();
+       for (itE = v->incoming_edges_begin(); itE != v->incoming_edges_end(); itE++) {
+               area += (*itE)->GetaFace()->getArea();
+       }
 
        for (itE = v->incoming_edges_begin(); itE != v->incoming_edges_end(); itE++) {
                WOEdge *e = (*itE)->getPrevOnFace();
index d1102b03e9afcefb03831177be7f56888988e8a7..56167d466f1892726c9e9ed3b710a5efa105dcd4 100644 (file)
@@ -247,8 +247,9 @@ static GPUBuffer *gpu_buffer_alloc_intern(int size, bool use_VBO)
                bufsize = pool->buffers[i]->size;
 
                /* only return a buffer that matches the VBO preference */
-                if (pool->buffers[i]->use_vbo != use_VBO)
+               if (pool->buffers[i]->use_vbo != use_VBO) {
                         continue;
+               }
                
                /* check for an exact size match */
                if (bufsize == size) {
@@ -653,8 +654,8 @@ static GPUBuffer *gpu_buffer_setup(DerivedMesh *dm, GPUDrawObject *object,
 
                        /* attempt to map the buffer */
                        if (!(varray = glMapBufferARB(target, GL_WRITE_ONLY_ARB))) {
-                                buffer = gpu_try_realloc(pool, buffer, size, true);
-                                
+                               buffer = gpu_try_realloc(pool, buffer, size, true);
+
                                /* allocation still failed; fall back
                                 * to legacy mode */
                                if (!buffer) {
index 41049e8430ab3492e537c9ecda2dbd6856e0a58d..f8499ca2d34472d780dda7af385e588278087f42 100644 (file)
@@ -2128,18 +2128,18 @@ GPUNodeLink *GPU_lamp_get_data(GPUMaterial *mat, GPULamp *lamp, GPUNodeLink **co
 
                if (lamp->la->shadowmap_type == LA_SHADMAP_VARIANCE) {
                        GPU_link(mat, "shadows_only_vsm",
-                                GPU_builtin(GPU_VIEW_POSITION),
-                                GPU_dynamic_texture(lamp->tex, GPU_DYNAMIC_SAMPLER_2DSHADOW, lamp->ob),
-                                GPU_dynamic_uniform((float*)lamp->dynpersmat, GPU_DYNAMIC_LAMP_DYNPERSMAT, lamp->ob),
-                                GPU_uniform(&lamp->bias), GPU_uniform(&lamp->la->bleedbias),
-                                GPU_uniform(lamp->shadow_color), inp, shadow);
+                                GPU_builtin(GPU_VIEW_POSITION),
+                                GPU_dynamic_texture(lamp->tex, GPU_DYNAMIC_SAMPLER_2DSHADOW, lamp->ob),
+                                GPU_dynamic_uniform((float*)lamp->dynpersmat, GPU_DYNAMIC_LAMP_DYNPERSMAT, lamp->ob),
+                                GPU_uniform(&lamp->bias), GPU_uniform(&lamp->la->bleedbias),
+                                GPU_uniform(lamp->shadow_color), inp, shadow);
                }
                else {
                        GPU_link(mat, "shadows_only",
-                                GPU_builtin(GPU_VIEW_POSITION),
-                                GPU_dynamic_texture(lamp->tex, GPU_DYNAMIC_SAMPLER_2DSHADOW, lamp->ob),
-                                GPU_dynamic_uniform((float*)lamp->dynpersmat, GPU_DYNAMIC_LAMP_DYNPERSMAT, lamp->ob),
-                                GPU_uniform(&lamp->bias), GPU_uniform(lamp->shadow_color), inp, shadow);
+                                GPU_builtin(GPU_VIEW_POSITION),
+                                GPU_dynamic_texture(lamp->tex, GPU_DYNAMIC_SAMPLER_2DSHADOW, lamp->ob),
+                                GPU_dynamic_uniform((float*)lamp->dynpersmat, GPU_DYNAMIC_LAMP_DYNPERSMAT, lamp->ob),
+                                GPU_uniform(&lamp->bias), GPU_uniform(lamp->shadow_color), inp, shadow);
                }
        }
        else {
index 59d08128e5f3d2b52f7a14a0ba6dbc281549758e..65abf22ff2c205603be21787b7dd705d4f95fcc1 100644 (file)
@@ -169,8 +169,8 @@ void IMB_buffer_byte_from_float(uchar *rect_to, const float *rect_from,
        float tmp[4];
        int x, y;
        DitherContext *di = NULL;
-       float inv_width = 1.0f / width,
-             inv_height = 1.0f / height;
+       float inv_width = 1.0f / width;
+       float inv_height = 1.0f / height;
 
        /* we need valid profiles */
        BLI_assert(profile_to != IB_PROFILE_NONE);
index 3fb047ebbe7e3a3b77b35dadfd81475de608557a..beffbc4c01783d89e6d58160a74ddce336562000 100644 (file)
@@ -188,7 +188,7 @@ typedef enum eGPdata_Flag {
        GP_DATA_EXPAND          = (1 << 2),
        
        /* is the block overriding all clicks? */
-       /* GP_DATA_EDITPAINT = (1 << 3), */
+       /* GP_DATA_EDITPAINT = (1 << 3), */
        
        /* new strokes are added in viewport space */
        GP_DATA_VIEWALIGN       = (1 << 4),
index 718a9dd7c6ea60c0271938376e939b813146a710..fea8b630af6a428755264664831e5de276082bbf 100644 (file)
@@ -682,14 +682,14 @@ void RNA_api_ui_layout(StructRNA *srna)
        
        func = RNA_def_function(srna, "template_modifier", "uiTemplateModifier");
        RNA_def_function_flag(func, FUNC_USE_CONTEXT);
-       RNA_def_function_ui_description(func, "Layout . Generates the UI layout for modifiers");
+       RNA_def_function_ui_description(func, "Generates the UI layout for modifiers");
        parm = RNA_def_pointer(func, "data", "Modifier", "", "Modifier data");
        RNA_def_property_flag(parm, PROP_REQUIRED | PROP_RNAPTR | PROP_NEVER_NULL);
        parm = RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in");
        RNA_def_function_return(func, parm);
 
        func = RNA_def_function(srna, "template_constraint", "uiTemplateConstraint");
-       RNA_def_function_ui_description(func, "Layout . Generates the UI layout for constraints");
+       RNA_def_function_ui_description(func, "Generates the UI layout for constraints");
        parm = RNA_def_pointer(func, "data", "Constraint", "", "Constraint data");
        RNA_def_property_flag(parm, PROP_REQUIRED | PROP_RNAPTR | PROP_NEVER_NULL);
        parm = RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in");
index 0c193df38619c5bb1fbc51ba505a4afcef3a1f40..cbc76e26aa9ee8c2b10ca0d225b3a2d32f5544d5 100644 (file)
@@ -814,22 +814,26 @@ void free_qtcomponentdata(void)
 void quicktime_verify_image_type(RenderData *rd, ImageFormatData *imf)
 {
        if (imf->imtype == R_IMF_IMTYPE_QUICKTIME) {
-               if ((rd->qtcodecsettings.codecType<= 0) ||
-                       (rd->qtcodecsettings.codecSpatialQuality <0) ||
-                       (rd->qtcodecsettings.codecSpatialQuality > 100)) {
-                       
+               if ((rd->qtcodecsettings.codecType <= 0) ||
+                   (rd->qtcodecsettings.codecSpatialQuality < 0) ||
+                   (rd->qtcodecsettings.codecSpatialQuality > 100))
+               {
                        rd->qtcodecsettings.codecType = kJPEGCodecType;
-                       rd->qtcodecsettings.codecSpatialQuality = (codecHighQuality*100)/codecLosslessQuality;
+                       rd->qtcodecsettings.codecSpatialQuality = (codecHighQuality * 100) / codecLosslessQuality;
                }
                if ((rd->qtcodecsettings.audioSampleRate < 21000) ||
-                       (rd->qtcodecsettings.audioSampleRate > 193000)) 
+                   (rd->qtcodecsettings.audioSampleRate > 193000))
+               {
                        rd->qtcodecsettings.audioSampleRate = 48000;
+               }
                
-               if (rd->qtcodecsettings.audioBitDepth == 0)
+               if (rd->qtcodecsettings.audioBitDepth == 0) {
                        rd->qtcodecsettings.audioBitDepth = AUD_FORMAT_S16;
+               }
                
-               if (rd->qtcodecsettings.audioBitRate == 0)
+               if (rd->qtcodecsettings.audioBitRate == 0) {
                        rd->qtcodecsettings.audioBitRate = 256000;
+               }
        }
 }
 
index 1e30e05fe1a0941be385b052c09ed995bd0638d7..21ca7924fa0d8fb2fa9c3a0876c9ceff055e4443 100644 (file)
@@ -718,10 +718,10 @@ static void render_result_rescale(Render *re)
                        scale_y = (float) result->recty / re->result->recty;
                        for (x = 0; x < re->result->rectx; ++x) {
                                for (y = 0; y < re->result->recty; ++y) {
-                                       int src_x = x * scale_x,
-                                           src_y = y * scale_y;
-                                       int dst_index = y * re->result->rectx + x,
-                                           src_index = src_y * result->rectx + src_x;
+                                       int src_x = x * scale_x;
+                                       int src_y = y * scale_y;
+                                       int dst_index = y * re->result->rectx + x;
+                                       int src_index = src_y * result->rectx + src_x;
                                        copy_v4_v4(dst_rectf + dst_index * 4,
                                                   src_rectf + src_index * 4);
                                }
index 8774abe04b2bb9003eb3e762362ca288936bc717..4afa181853667e669e4f960ea0516ff702a1f594 100644 (file)
@@ -138,7 +138,7 @@ bool KX_MouseActuator::Update()
                                        center_x = ((m_canvas->GetWidth() - 1.0) / 2.0) / (m_canvas->GetWidth());
                                }
                                if ((m_canvas->GetHeight() % 2) != 0) {
-                                   center_y = ((m_canvas->GetHeight() - 1.0) / 2.0) / (m_canvas->GetHeight());
+                                       center_y = ((m_canvas->GetHeight() - 1.0) / 2.0) / (m_canvas->GetHeight());
                                }
 
                                //preventing initial skipping.