Cleanup: style, whitespace, doxy filepaths
authorCampbell Barton <ideasman42@gmail.com>
Sat, 18 Jun 2016 20:25:54 +0000 (06:25 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 18 Jun 2016 20:33:29 +0000 (06:33 +1000)
63 files changed:
source/blender/blenkernel/intern/anim.c
source/blender/blenkernel/intern/dynamicpaint.c
source/blender/blenkernel/intern/library_idmap.c
source/blender/blenkernel/intern/node.c
source/blender/blenkernel/intern/particle_system.c
source/blender/blenkernel/intern/pointcache.c
source/blender/blenlib/intern/array_utils.c
source/blender/blenlib/intern/storage.c
source/blender/blenlib/intern/task.c
source/blender/collada/MeshImporter.cpp
source/blender/depsgraph/intern/builder/deg_builder.cc
source/blender/depsgraph/intern/builder/deg_builder.h
source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
source/blender/depsgraph/intern/builder/deg_builder_pchanmap.cc
source/blender/depsgraph/intern/builder/deg_builder_relations.cc
source/blender/depsgraph/intern/builder/deg_builder_relations.h
source/blender/depsgraph/intern/builder/deg_builder_transitive.cc
source/blender/depsgraph/intern/depsgraph_type_defines.cc
source/blender/depsgraph/intern/eval/deg_eval.cc
source/blender/depsgraph/intern/eval/deg_eval.h
source/blender/depsgraph/intern/eval/deg_eval_flush.cc
source/blender/depsgraph/intern/eval/deg_eval_flush.h
source/blender/depsgraph/intern/nodes/deg_node.cc
source/blender/depsgraph/intern/nodes/deg_node.h
source/blender/depsgraph/intern/nodes/deg_node_component.cc
source/blender/depsgraph/intern/nodes/deg_node_component.h
source/blender/depsgraph/intern/nodes/deg_node_operation.cc
source/blender/depsgraph/intern/nodes/deg_node_operation.h
source/blender/editors/interface/interface_panel.c
source/blender/editors/io/io_collada.c
source/blender/editors/mesh/editmesh_knife.c
source/blender/editors/mesh/editmesh_rip.c
source/blender/editors/physics/particle_edit.c
source/blender/editors/space_image/image_ops.c
source/blender/editors/space_view3d/drawobject.c
source/blender/editors/space_view3d/view3d_edit.c
source/blender/editors/transform/transform_snap.c
source/blender/freestyle/intern/python/BPy_FrsNoise.cpp
source/blender/gpu/intern/gpu_draw.c
source/blender/makesdna/DNA_camera_types.h
source/blender/makesdna/intern/dna_genfile.c
source/blender/makesrna/intern/rna_scene_api.c
source/blender/nodes/shader/node_shader_tree.c
source/blender/nodes/shader/nodes/node_shader_normal_map.c
source/gameengine/Converter/BL_BlenderDataConversion.cpp
source/gameengine/Converter/KX_ConvertActuators.cpp
source/gameengine/Expressions/EXP_PyObjectPlus.h
source/gameengine/GameLogic/SCA_PropertySensor.cpp
source/gameengine/Ketsji/KX_GameObject.cpp
source/gameengine/Ketsji/KX_Light.cpp
source/gameengine/Ketsji/KX_Scene.cpp
source/gameengine/Ketsji/KX_SoundActuator.cpp
source/gameengine/Ketsji/KX_TrackToActuator.cpp
source/gameengine/Ketsji/KX_VehicleWrapper.cpp
source/gameengine/Physics/Bullet/CcdPhysicsController.h
source/gameengine/Physics/common/PHY_ICharacter.h
source/gameengine/Physics/common/PHY_IController.h
source/gameengine/Physics/common/PHY_IMotionState.h
source/gameengine/Physics/common/PHY_IPhysicsController.h
source/gameengine/Physics/common/PHY_IPhysicsEnvironment.h
source/gameengine/Physics/common/PHY_IVehicle.h
source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_StorageVA.h
source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_StorageVBO.h

index dff696863e99253c3b67d65c2a66919be8b995c6..7d3d12ac1120fa8e234d0110ddbab8440f601599 100644 (file)
@@ -340,11 +340,11 @@ static void motionpaths_calc_update_scene(Scene *scene)
                }
        }
 #else // original, 'always correct' version
-         /* do all updates
-          *  - if this is too slow, resort to using a more efficient way
-          *    that doesn't force complete update, but for now, this is the
-          *    most accurate way!
-          */
+       /* do all updates
+        *  - if this is too slow, resort to using a more efficient way
+        *    that doesn't force complete update, but for now, this is the
+        *    most accurate way!
+        */
        BKE_scene_update_for_newframe(G.main->eval_ctx, G.main, scene, scene->lay); /* XXX this is the best way we can get anything moving */
 #endif
 }
index 2d531e32f6999dec3d3173d8ac808e8c368499b0..cc495b3da7a64d98f9735d0c72b6167705bb6b71 100644 (file)
@@ -1826,14 +1826,14 @@ static DerivedMesh *dynamicPaint_Modifier_apply(
                                                DynamicPaintModifierApplyData data = {.surface = surface, .fcolor = fcolor};
                                                BLI_task_parallel_range(0, sData->total_points, &data,
                                                                        dynamic_paint_apply_surface_vpaint_blend_cb,
-                                                                                               sData->total_points > 1000);
+                                                                       sData->total_points > 1000);
 
                                                /* paint layer */
                                                MLoopCol *mloopcol = CustomData_get_layer_named(&result->loopData, CD_MLOOPCOL, surface->output_name);
                                                /* if output layer is lost from a constructive modifier, re-add it */
                                                if (!mloopcol && dynamicPaint_outputLayerExists(surface, ob, 0)) {
                                                        mloopcol = CustomData_add_layer_named(
-                                                                         &result->loopData, CD_MLOOPCOL, CD_CALLOC, NULL, totloop, surface->output_name);
+                                                               &result->loopData, CD_MLOOPCOL, CD_CALLOC, NULL, totloop, surface->output_name);
                                                }
 
                                                /* wet layer */
@@ -1841,7 +1841,7 @@ static DerivedMesh *dynamicPaint_Modifier_apply(
                                                /* if output layer is lost from a constructive modifier, re-add it */
                                                if (!mloopcol_wet && dynamicPaint_outputLayerExists(surface, ob, 1)) {
                                                        mloopcol_wet = CustomData_add_layer_named(
-                                                                                 &result->loopData, CD_MLOOPCOL, CD_CALLOC, NULL, totloop, surface->output_name2);
+                                                               &result->loopData, CD_MLOOPCOL, CD_CALLOC, NULL, totloop, surface->output_name2);
                                                }
 
                                                /* Save preview results to weight layer to be able to share same drawing methods */
@@ -1850,7 +1850,7 @@ static DerivedMesh *dynamicPaint_Modifier_apply(
                                                        mloopcol_preview = CustomData_get_layer(&result->loopData, CD_PREVIEW_MLOOPCOL);
                                                        if (!mloopcol_preview) {
                                                                mloopcol_preview = CustomData_add_layer(
-                                                                                                 &result->loopData, CD_PREVIEW_MLOOPCOL, CD_CALLOC, NULL, totloop);
+                                                                       &result->loopData, CD_PREVIEW_MLOOPCOL, CD_CALLOC, NULL, totloop);
                                                        }
                                                }
 
@@ -2367,15 +2367,15 @@ static int dynamic_paint_find_neighbour_pixel(
                edge1_index = 0;
                edge2_index = 1;
                dist_squared = dist_squared_to_line_segment_v2(
-                                                  pixel,
-                                                  mloopuv[mlooptri[cPoint->tri_index].tri[0]].uv,
-                                                  mloopuv[mlooptri[cPoint->tri_index].tri[1]].uv);
+                       pixel,
+                       mloopuv[mlooptri[cPoint->tri_index].tri[0]].uv,
+                       mloopuv[mlooptri[cPoint->tri_index].tri[1]].uv);
 
                /* Dist to second edge */
                t_dist_squared = dist_squared_to_line_segment_v2(
-                                                        pixel,
-                                                        mloopuv[mlooptri[cPoint->tri_index].tri[1]].uv,
-                                                        mloopuv[mlooptri[cPoint->tri_index].tri[2]].uv);
+                       pixel,
+                       mloopuv[mlooptri[cPoint->tri_index].tri[1]].uv,
+                       mloopuv[mlooptri[cPoint->tri_index].tri[2]].uv);
                if (t_dist_squared < dist_squared) {
                        e1_index = cPoint->v2;
                        e2_index = cPoint->v3;
@@ -2386,9 +2386,9 @@ static int dynamic_paint_find_neighbour_pixel(
 
                /* Dist to third edge */
                t_dist_squared = dist_squared_to_line_segment_v2(
-                                                        pixel,
-                                                        mloopuv[mlooptri[cPoint->tri_index].tri[2]].uv,
-                                                        mloopuv[mlooptri[cPoint->tri_index].tri[0]].uv);
+                       pixel,
+                       mloopuv[mlooptri[cPoint->tri_index].tri[2]].uv,
+                       mloopuv[mlooptri[cPoint->tri_index].tri[0]].uv);
                if (t_dist_squared < dist_squared) {
                        e1_index = cPoint->v3;
                        e2_index = cPoint->v1;
@@ -2439,9 +2439,9 @@ static int dynamic_paint_find_neighbour_pixel(
                //printf("connected UV : %f,%f & %f,%f - %f,%f & %f,%f\n", s_uv1[0], s_uv1[1], s_uv2[0], s_uv2[1], t_uv1[0], t_uv1[1], t_uv2[0], t_uv2[1]);
 
                if (((s_uv1[0] == t_uv1[0] && s_uv1[1] == t_uv1[1]) &&
-                        (s_uv2[0] == t_uv2[0] && s_uv2[1] == t_uv2[1])) ||
-                       ((s_uv2[0] == t_uv1[0] && s_uv2[1] == t_uv1[1]) &&
-                        (s_uv1[0] == t_uv2[0] && s_uv1[1] == t_uv2[1])))
+                    (s_uv2[0] == t_uv2[0] && s_uv2[1] == t_uv2[1])) ||
+                   ((s_uv2[0] == t_uv1[0] && s_uv2[1] == t_uv1[1]) &&
+                    (s_uv1[0] == t_uv2[0] && s_uv1[1] == t_uv2[1])))
                {
                        return ((px + neighX[n_index]) + w * (py + neighY[n_index]));
                }
@@ -2451,15 +2451,15 @@ static int dynamic_paint_find_neighbour_pixel(
                 *      on this other face UV
                 */
                lambda = closest_to_line_v2(
-                                        closest_point, pixel,
-                                        mloopuv[mlooptri[cPoint->tri_index].tri[edge1_index]].uv,
-                                        mloopuv[mlooptri[cPoint->tri_index].tri[edge2_index]].uv);
+                       closest_point, pixel,
+                       mloopuv[mlooptri[cPoint->tri_index].tri[edge1_index]].uv,
+                       mloopuv[mlooptri[cPoint->tri_index].tri[edge2_index]].uv);
                CLAMP(lambda, 0.0f, 1.0f);
 
                sub_v2_v2v2(
-                               dir_vec,
-                               mloopuv[mlooptri[target_tri].tri[target_uv2]].uv,
-                               mloopuv[mlooptri[target_tri].tri[target_uv1]].uv);
+                       dir_vec,
+                       mloopuv[mlooptri[target_tri].tri[target_uv2]].uv,
+                       mloopuv[mlooptri[target_tri].tri[target_uv1]].uv);
 
                mul_v2_fl(dir_vec, lambda);
 
@@ -2678,8 +2678,8 @@ int dynamicPaint_createUVSurface(Scene *scene, DynamicPaintSurface *surface, flo
                ImgSeqFormatData *f_data = MEM_callocN(sizeof(*f_data), "ImgSeqFormatData");
                if (f_data) {
                        f_data->uv_p = MEM_callocN(active_points * sizeof(*f_data->uv_p), "PaintUVPoint");
-                       f_data->barycentricWeights = MEM_callocN(active_points * aa_samples * sizeof(*f_data->barycentricWeights),
-                                                                                                        "PaintUVPoint");
+                       f_data->barycentricWeights =
+                               MEM_callocN(active_points * aa_samples * sizeof(*f_data->barycentricWeights), "PaintUVPoint");
 
                        if (!f_data->uv_p || !f_data->barycentricWeights)
                                error = 1;
@@ -2881,7 +2881,7 @@ void dynamicPaint_outputSurfaceImage(DynamicPaintSurface *surface, char *filenam
        }
 
        DynamicPaintOutputSurfaceImageData data = {.surface = surface, .ibuf = ibuf};
-       switch(surface->type) {
+       switch (surface->type) {
                case MOD_DPAINT_SURFACE_T_PAINT:
                        switch (output_layer) {
                                case 0:
@@ -3883,12 +3883,12 @@ static int dynamicPaint_paintMesh(DynamicPaintSurface *surface,
 
                                        /* loop through cell points and process brush */
                                        DynamicPaintPaintData data = {
-                                               .surface = surface,
+                                           .surface = surface,
                                            .brush = brush, .brushOb = brushOb, .bMats = bMats,
                                            .scene = scene, .timescale = timescale, .c_index = c_index,
-                                               .dm = dm, .mvert = mvert, .mloop = mloop, .mlooptri = mlooptri,
-                                               .brush_radius = brush_radius, .avg_brushNor = avg_brushNor, .brushVelocity = brushVelocity,
-                                               .treeData = &treeData
+                                           .dm = dm, .mvert = mvert, .mloop = mloop, .mlooptri = mlooptri,
+                                           .brush_radius = brush_radius, .avg_brushNor = avg_brushNor, .brushVelocity = brushVelocity,
+                                           .treeData = &treeData
                                        };
                                        BLI_task_parallel_range_ex(0, grid->s_num[c_index], &data, NULL, 0,
                                                                   dynamic_paint_paint_mesh_cell_point_cb_ex,
@@ -4170,10 +4170,10 @@ static int dynamicPaint_paintParticles(DynamicPaintSurface *surface,
 
                        /* loop through cell points */
                        DynamicPaintPaintData data = {
-                               .surface = surface,
+                           .surface = surface,
                            .brush = brush, .psys = psys,
                            .solidradius = solidradius, .timescale = timescale, .c_index = c_index,
-                               .treeData = tree,
+                           .treeData = tree,
                        };
                        BLI_task_parallel_range_ex(0, grid->s_num[c_index], &data, NULL, 0,
                                                   dynamic_paint_paint_particle_cell_point_cb_ex,
@@ -4313,16 +4313,16 @@ static int dynamicPaint_paintSinglePoint(
         *      Loop through every surface point
         */
        DynamicPaintPaintData data = {
-               .surface = surface,
-               .brush = brush, .brushOb = brushOb, .bMats = bMats,
-               .scene = scene, .timescale = timescale,
-               .mvert = mvert,
-               .brush_radius = brush_radius, .brushVelocity = &brushVel,
+           .surface = surface,
+           .brush = brush, .brushOb = brushOb, .bMats = bMats,
+           .scene = scene, .timescale = timescale,
+           .mvert = mvert,
+           .brush_radius = brush_radius, .brushVelocity = &brushVel,
            .pointCoord = pointCoord,
        };
        BLI_task_parallel_range_ex(0, sData->total_points, &data, NULL, 0,
-                                                          dynamic_paint_paint_single_point_cb_ex,
-                                                          sData->total_points > 1000, true);
+                                  dynamic_paint_paint_single_point_cb_ex,
+                                  sData->total_points > 1000, true);
 
        return 1;
 }
@@ -4755,83 +4755,83 @@ static void dynamic_paint_effect_drip_cb(void *userdata, const int index)
 {
        const DynamicPaintEffectData *data = userdata;
 
-    const DynamicPaintSurface *surface = data->surface;
-    const PaintSurfaceData *sData = surface->data;
-    BakeAdjPoint *bNeighs = sData->bData->bNeighs;
-    PaintPoint *pPoint = &((PaintPoint *)sData->type_data)[index];
-    const PaintPoint *prevPoint = data->prevPoint;
-    const PaintPoint *pPoint_prev = &prevPoint[index];
-    const float *force = data->force;
-    const float eff_scale = data->eff_scale;
+       const DynamicPaintSurface *surface = data->surface;
+       const PaintSurfaceData *sData = surface->data;
+       BakeAdjPoint *bNeighs = sData->bData->bNeighs;
+       PaintPoint *pPoint = &((PaintPoint *)sData->type_data)[index];
+       const PaintPoint *prevPoint = data->prevPoint;
+       const PaintPoint *pPoint_prev = &prevPoint[index];
+       const float *force = data->force;
+       const float eff_scale = data->eff_scale;
 
-    const int *n_target = sData->adj_data->n_target;
+       const int *n_target = sData->adj_data->n_target;
 
-    uint8_t *point_locks = data->point_locks;
+       uint8_t *point_locks = data->point_locks;
 
-    int closest_id[2];
-    float closest_d[2];
+       int closest_id[2];
+       float closest_d[2];
 
-    /* adjust drip speed depending on wetness */
-    float w_factor = pPoint_prev->wetness - 0.025f;
-    if (w_factor <= 0)
-           return;
-    CLAMP(w_factor, 0.0f, 1.0f);
+       /* adjust drip speed depending on wetness */
+       float w_factor = pPoint_prev->wetness - 0.025f;
+       if (w_factor <= 0)
+               return;
+       CLAMP(w_factor, 0.0f, 1.0f);
 
-    /* get force affect points */
-    surface_determineForceTargetPoints(sData, index, &force[index * 4], closest_d, closest_id);
+       /* get force affect points */
+       surface_determineForceTargetPoints(sData, index, &force[index * 4], closest_d, closest_id);
 
-    /* Apply movement towards those two points */
-    for (int i = 0; i < 2; i++) {
-           const int n_idx = closest_id[i];
-           if (n_idx != -1 && closest_d[i] > 0.0f) {
-                   const float dir_dot = closest_d[i];
+       /* Apply movement towards those two points */
+       for (int i = 0; i < 2; i++) {
+               const int n_idx = closest_id[i];
+               if (n_idx != -1 && closest_d[i] > 0.0f) {
+                       const float dir_dot = closest_d[i];
 
-                   /* just skip if angle is too extreme */
-                   if (dir_dot <= 0.0f)
-                           continue;
+                       /* just skip if angle is too extreme */
+                       if (dir_dot <= 0.0f)
+                               continue;
 
-                   float dir_factor, a_factor;
-                   const float speed_scale = eff_scale * force[index * 4 + 3] / bNeighs[n_idx].dist;
+                       float dir_factor, a_factor;
+                       const float speed_scale = eff_scale * force[index * 4 + 3] / bNeighs[n_idx].dist;
 
-                   const unsigned int n_trgt = (unsigned int)n_target[n_idx];
+                       const unsigned int n_trgt = (unsigned int)n_target[n_idx];
 
-                   /* Sort of spinlock, but only for given ePoint.
-                    * Since the odds a same ePoint is modified at the same time by several threads is very low, this is
-                    * much more eficient than a global spin lock. */
-                   const unsigned int pointlock_idx = n_trgt / 8;
-                   const uint8_t pointlock_bitmask = 1 << (n_trgt & 7);  /* 7 == 0b111 */
-                   while (atomic_fetch_and_or_uint8(&point_locks[pointlock_idx], pointlock_bitmask) & pointlock_bitmask);
+                       /* Sort of spinlock, but only for given ePoint.
+                        * Since the odds a same ePoint is modified at the same time by several threads is very low, this is
+                        * much more eficient than a global spin lock. */
+                       const unsigned int pointlock_idx = n_trgt / 8;
+                       const uint8_t pointlock_bitmask = 1 << (n_trgt & 7);  /* 7 == 0b111 */
+                       while (atomic_fetch_and_or_uint8(&point_locks[pointlock_idx], pointlock_bitmask) & pointlock_bitmask);
 
-                   PaintPoint *ePoint = &((PaintPoint *)sData->type_data)[n_trgt];
-                   const float e_wet = ePoint->wetness;
+                       PaintPoint *ePoint = &((PaintPoint *)sData->type_data)[n_trgt];
+                       const float e_wet = ePoint->wetness;
 
-                   dir_factor = min_ff(0.5f, dir_dot * min_ff(speed_scale, 1.0f) * w_factor);
+                       dir_factor = min_ff(0.5f, dir_dot * min_ff(speed_scale, 1.0f) * w_factor);
 
-                   /* mix new wetness */
-                   ePoint->wetness += dir_factor;
-                   CLAMP(ePoint->wetness, 0.0f, MAX_WETNESS);
+                       /* mix new wetness */
+                       ePoint->wetness += dir_factor;
+                       CLAMP(ePoint->wetness, 0.0f, MAX_WETNESS);
 
-                   /* mix new color */
-                   a_factor = dir_factor / pPoint_prev->wetness;
-                   CLAMP(a_factor, 0.0f, 1.0f);
-                   mixColors(ePoint->e_color, ePoint->e_color[3], pPoint_prev->e_color, pPoint_prev->e_color[3], a_factor);
-                   /* dripping is supposed to preserve alpha level */
-                   if (pPoint_prev->e_color[3] > ePoint->e_color[3]) {
-                           ePoint->e_color[3] += a_factor * pPoint_prev->e_color[3];
-                           CLAMP_MAX(ePoint->e_color[3], pPoint_prev->e_color[3]);
-                   }
+                       /* mix new color */
+                       a_factor = dir_factor / pPoint_prev->wetness;
+                       CLAMP(a_factor, 0.0f, 1.0f);
+                       mixColors(ePoint->e_color, ePoint->e_color[3], pPoint_prev->e_color, pPoint_prev->e_color[3], a_factor);
+                       /* dripping is supposed to preserve alpha level */
+                       if (pPoint_prev->e_color[3] > ePoint->e_color[3]) {
+                               ePoint->e_color[3] += a_factor * pPoint_prev->e_color[3];
+                               CLAMP_MAX(ePoint->e_color[3], pPoint_prev->e_color[3]);
+                       }
 
-                   /* decrease paint wetness on current point */
-                   pPoint->wetness -= (ePoint->wetness - e_wet);
-                   CLAMP(pPoint->wetness, 0.0f, MAX_WETNESS);
+                       /* decrease paint wetness on current point */
+                       pPoint->wetness -= (ePoint->wetness - e_wet);
+                       CLAMP(pPoint->wetness, 0.0f, MAX_WETNESS);
 
 #ifndef NDEBUG
                        uint8_t ret = atomic_fetch_and_and_uint8(&point_locks[pointlock_idx], ~pointlock_bitmask);
-               BLI_assert(ret & pointlock_bitmask);
+                       BLI_assert(ret & pointlock_bitmask);
 #else
                        atomic_fetch_and_and_uint8(&point_locks[pointlock_idx], ~pointlock_bitmask);
 #endif
-           }
+               }
        }
 }
 
@@ -4892,7 +4892,7 @@ static void dynamicPaint_doEffectStep(
                memcpy(prevPoint, sData->type_data, sData->total_points * sizeof(struct PaintPoint));
 
                DynamicPaintEffectData data = {
-                       .surface = surface, .prevPoint = prevPoint,
+                   .surface = surface, .prevPoint = prevPoint,
                    .eff_scale = eff_scale, .force = force,
                    .point_locks = point_locks,
                };
@@ -5108,7 +5108,7 @@ static void dynamic_paint_surface_pre_step_cb(void *userdata, const int index)
                                        if (pPoint->color[3]) {
                                                for (i = 0; i < 3; i++) {
                                                        pPoint->color[i] = (f_color[i] * f_color[3] - pPoint->e_color[i] * pPoint->e_color[3]) /
-                                                                                          (pPoint->color[3] * (1.0f - pPoint->e_color[3]));
+                                                                          (pPoint->color[3] * (1.0f - pPoint->e_color[3]));
                                                }
                                        }
                                }
@@ -5129,17 +5129,17 @@ static void dynamic_paint_surface_pre_step_cb(void *userdata, const int index)
 
                if (surface->flags & MOD_DPAINT_DISSOLVE) {
                        value_dissolve(&pPoint->color[3], surface->diss_speed, timescale,
-                                                  (surface->flags & MOD_DPAINT_DISSOLVE_LOG) != 0);
+                                      (surface->flags & MOD_DPAINT_DISSOLVE_LOG) != 0);
                        CLAMP_MIN(pPoint->color[3], 0.0f);
 
                        value_dissolve(&pPoint->e_color[3], surface->diss_speed, timescale,
-                                                  (surface->flags & MOD_DPAINT_DISSOLVE_LOG) != 0);
+                                      (surface->flags & MOD_DPAINT_DISSOLVE_LOG) != 0);
                        CLAMP_MIN(pPoint->e_color[3], 0.0f);
                }
        }
        /* dissolve for float types */
        else if (surface->flags & MOD_DPAINT_DISSOLVE &&
-                        (surface->type == MOD_DPAINT_SURFACE_T_DISPLACE || surface->type == MOD_DPAINT_SURFACE_T_WEIGHT))
+                (surface->type == MOD_DPAINT_SURFACE_T_DISPLACE || surface->type == MOD_DPAINT_SURFACE_T_WEIGHT))
        {
                float *point = &((float *)sData->type_data)[index];
                /* log or linear */
@@ -5388,7 +5388,7 @@ static int dynamicPaint_generateBakeData(DynamicPaintSurface *surface, const Sce
         */
        DynamicPaintGenerateBakeData data = {
            .surface = surface, .ob = ob,
-               .mvert = mvert, .canvas_verts = canvas_verts,
+           .mvert = mvert, .canvas_verts = canvas_verts,
            .do_velocity_data = do_velocity_data, .new_bdata = new_bdata,
        };
        BLI_task_parallel_range(
index 66025c04332d058915f0f8eab8f4b6b86079c1c7..daf097b9f0b8e727c15aa971293f3fec6625d2e1 100644 (file)
@@ -33,7 +33,7 @@
 #include "BKE_library.h"
 #include "BKE_library_idmap.h"  /* own include */
 
-/** \file blender/blenkernel/intern/library_map.c
+/** \file blender/blenkernel/intern/library_idmap.c
  *  \ingroup bke
  *
  * Utility functions for faster ID lookups.
index fa0367d16566f5fbfc6af9957690bf03b4c4c5f4..2b381f6ff0b00370ce9dd4af35ba3e7d2530e132 100644 (file)
@@ -2418,7 +2418,8 @@ void ntreeInterfaceTypeUpdate(bNodeTree *ntree)
 
 /* ************ find stuff *************** */
 
-bNode *ntreeFindType(const bNodeTree *ntree, int type) {
+bNode *ntreeFindType(const bNodeTree *ntree, int type)
+{
        if (ntree) {
                for (bNode * node = ntree->nodes.first; node; node = node->next) {
                        if (node->type == type) {
index 1ca68f714c811a43ccd5f4734c0ab3fcc31561da..4fa80723df8b350fea9f7e9f61d545b2067a8321 100644 (file)
@@ -230,7 +230,7 @@ static void realloc_particles(ParticleSimulationData *sim, int new_totpart)
                                newboids= MEM_callocN(totpart*sizeof(BoidParticle), "boid particles");
 
                                if (newboids == NULL) {
-                                        /* allocation error! */
+                                       /* allocation error! */
                                        if (newpars)
                                                MEM_freeN(newpars);
                                        return;
index f0ba63e35b442ded1a200fd8eb829f5374f9ace6..7b8f4986325f7b40b7ed715845612a3c603cbce3 100644 (file)
@@ -2501,7 +2501,7 @@ static int ptcache_read_openvdb_stream(PTCacheID *pid, int cfra)
 #ifdef WITH_OPENVDB
        char filename[FILE_MAX * 2];
 
-        /* save blend file before using disk pointcache */
+       /* save blend file before using disk pointcache */
        if (!G.relbase_valid && (pid->cache->flag & PTCACHE_EXTERNAL) == 0)
                return 0;
 
index 5d485e2033deffee1cafe08193660c41b30f28a3..9c91da4abee4e52ef9ac745b41a01a98d2f4b7b6 100644 (file)
@@ -183,7 +183,7 @@ void _bli_array_binary_or(
  * \param user_data: User data for \a test_fn.
  * \param span_step: Indices to iterate over,
  * initialize both values to the array length to initialize iteration.
- * \param: r_span_len: The length of the span, useful when \a use_wrap is enabled,
+ * \param r_span_len: The length of the span, useful when \a use_wrap is enabled,
  * where calculating the length isnt a simple subtraction.
  */
 bool _bli_array_iter_span(
index aba7c9d5ee20a508401c435d9ea6db0e979483f4..3edc00a8c1a4fc09e9f880ef7192f9c6edb20b81 100644 (file)
@@ -389,7 +389,7 @@ LinkNode *BLI_file_read_as_lines(const char *name)
                /*
                 * size = because on win32 reading
                 * all the bytes in the file will return
-                * less bytes because of crnl changes.
+                * less bytes because of `CRNL` changes.
                 */
                size = fread(buf, 1, size, fp);
                for (i = 0; i <= size; i++) {
index 58475b7f83500d69958d4e8e38e3fa0a03573960..0b299af88aa34217c813726c2ffb233249f432d9 100644 (file)
@@ -928,7 +928,7 @@ static void task_parallel_range_ex(
                                func_finalize(userdata, userdata_chunk_local);
                        }
                }
-        MALLOCA_FREE(userdata_chunk_array, userdata_chunk_size * num_tasks);
+               MALLOCA_FREE(userdata_chunk_array, userdata_chunk_size * num_tasks);
        }
 }
 
index 6085b66a8b87956dfe9787b57c7ae686a754f9a0..6ff6de33d565bee67a8b6e29aae016b112db9913 100644 (file)
@@ -172,8 +172,7 @@ void UVDataWrapper::getUV(int uv_index, float *uv)
        }
 }
 
-VCOLDataWrapper::VCOLDataWrapper(COLLADAFW::MeshVertexData& vdata) : mVData(&vdata){
-}
+VCOLDataWrapper::VCOLDataWrapper(COLLADAFW::MeshVertexData& vdata) : mVData(&vdata) {}
 
 void VCOLDataWrapper::get_vcol(int v_index, MLoopCol *mloopcol)
 {
index 9f80c21a6a46473767769f2cf25a07bb1a1462fd..6169100d574d4426136d574885699c3ae1cbc802 100644 (file)
@@ -24,7 +24,7 @@
  * ***** END GPL LICENSE BLOCK *****
  */
 
-/** \file blender/depsgraph/intern/build/deg_builder.cc
+/** \file blender/depsgraph/intern/builder/deg_builder.cc
  *  \ingroup depsgraph
  */
 
index 7ecb4b2068441d9293132c6a862397ed17431ac3..bdc030e3810b26a06dd8bb4bd974ba249921a7f5 100644 (file)
@@ -24,7 +24,7 @@
  * ***** END GPL LICENSE BLOCK *****
  */
 
-/** \file blender/depsgraph/intern/build/deg_builder.h
+/** \file blender/depsgraph/intern/builder/deg_builder.h
  *  \ingroup depsgraph
  */
 
index 18cfdb3593ae26b31f96099acb991c7c1dcf93d2..74a5be997f11619dc9440408e51002bea6ac9db1 100644 (file)
@@ -24,7 +24,7 @@
  * ***** END GPL LICENSE BLOCK *****
  */
 
-/** \file blender/depsgraph/intern/builder/deg_build_nodes.cc
+/** \file blender/depsgraph/intern/builder/deg_builder_nodes.cc
  *  \ingroup depsgraph
  *
  * Methods for constructing depsgraph's nodes
index 0e78df52ff8c264087d15a8c33b2e43ab3520588..f870a33fb681a1a0ad0db9ea97ce98e9aab8fcf4 100644 (file)
@@ -24,7 +24,7 @@
  * ***** END GPL LICENSE BLOCK *****
  */
 
-/** \file blender/depsgraph/intern/builder/deg_builder_pchanmap.h
+/** \file blender/depsgraph/intern/builder/deg_builder_pchanmap.cc
  *  \ingroup depsgraph
  */
 
index d333f1e80e28d5578d3decbc921c5f2f99f46d5f..cd706c87ae0b916f5351e13636a31215b30470a0 100644 (file)
@@ -1316,7 +1316,8 @@ void DepsgraphRelationBuilder::build_ik_pose(Object *ob,
 
                        OperationKey done_key(&ob->id, DEPSNODE_TYPE_BONE, parchan->name, DEG_OPCODE_BONE_DONE);
                        add_relation(solver_key, done_key, DEPSREL_TYPE_TRANSFORM, "IK Chain Result");
-               } else {
+               }
+               else {
                        OperationKey final_transforms_key(&ob->id, DEPSNODE_TYPE_BONE, parchan->name, DEG_OPCODE_BONE_DONE);
                        add_relation(solver_key, final_transforms_key, DEPSREL_TYPE_TRANSFORM, "IK Solver Result");
                }
index c0bf82becdaca2feb63ac74cf06453a370f50dbe..ce6d2c961fd3d7e7ba8b3c25812751c29e9a9071 100644 (file)
@@ -42,7 +42,6 @@
 #include "BLI_utildefines.h"
 #include "BLI_string.h"
 
-#include "intern/depsgraph_types.h"
 #include "intern/nodes/deg_node.h"
 #include "intern/nodes/deg_node_operation.h"
 
@@ -292,7 +291,8 @@ struct DepsNodeHandle
 /* Utilities for Builders ----------------------------------------------------- */
 
 template <typename KeyType>
-OperationDepsNode *DepsgraphRelationBuilder::find_operation_node(const KeyType& key) {
+OperationDepsNode *DepsgraphRelationBuilder::find_operation_node(const KeyType& key)
+{
        DepsNode *node = find_node(key);
        return node != NULL ? node->get_exit_operation() : NULL;
 }
index 0322ef7fa1d2560084a946aa392165eb852ad62c..76cd81f1b8f1adce5bc5a25731e25e1cb40d4eb8 100644 (file)
@@ -99,7 +99,7 @@ void deg_graph_transitive_reduction(Depsgraph *graph)
                /* Remove redundant paths to the target. */
                for (DepsNode::Relations::const_iterator it_rel = target->inlinks.begin();
                     it_rel != target->inlinks.end();
-                   )
+                    )
                {
                        DepsRelation *rel = *it_rel;
                        /* Increment in advance, so we can safely remove the relation. */
index 97208939e5749752918880c2d14af7d02ff299c9..4ce91516c84a924d4046a75a279082115338c281 100644 (file)
@@ -136,13 +136,15 @@ static const char *stringify_opcode(eDepsOperation_Code opcode)
        return "UNKNOWN";
 }
 
-DepsOperationStringifier::DepsOperationStringifier() {
+DepsOperationStringifier::DepsOperationStringifier()
+{
        for (int i = 0; i < DEG_NUM_OPCODES; ++i) {
                names_[i] = stringify_opcode((eDepsOperation_Code)i);
        }
 }
 
-const char *DepsOperationStringifier::operator[](eDepsOperation_Code opcode) {
+const char *DepsOperationStringifier::operator[](eDepsOperation_Code opcode)
+{
        BLI_assert((opcode > 0) && (opcode < DEG_NUM_OPCODES));
        if (opcode >= 0 && opcode < DEG_NUM_OPCODES) {
                return names_[opcode];
index 198cd349002656f07396df885d92b463cb3d14bd..3024d625846ea4543a078476e380df781d952359 100644 (file)
@@ -24,7 +24,7 @@
  * ***** END GPL LICENSE BLOCK *****
  */
 
-/** \file blender/depsgraph/intern/depsgraph_eval.cc
+/** \file blender/depsgraph/intern/eval/deg_eval.cc
  *  \ingroup depsgraph
  *
  * Evaluation engine entrypoints for Depsgraph Engine.
index 0d42f63433f5e60cae5bc005c1f6c4a7de2a8078..92f87b038032a553699a379819aff18f0a0ce612 100644 (file)
@@ -24,7 +24,7 @@
  * ***** END GPL LICENSE BLOCK *****
  */
 
-/** \file blender/depsgraph/intern/eval/deg_eval.cc
+/** \file blender/depsgraph/intern/eval/deg_eval.h
  *  \ingroup depsgraph
  *
  * Evaluation engine entrypoints for Depsgraph Engine.
index fda665b0db4284933fa4051c3a20974bb0f1baf0..9ba0b61a4f1e3a0bdae9013a7c46a85f2494f14e 100644 (file)
@@ -24,7 +24,7 @@
  * ***** END GPL LICENSE BLOCK *****
  */
 
-/** \file blender/depsgraph/intern/depsgraph_tag.cc
+/** \file blender/depsgraph/intern/eval/deg_eval_flush.cc
  *  \ingroup depsgraph
  *
  * Core routines for how the Depsgraph works.
index 8912aebee7d2035a8a075ea31ed9ddea6ab0a28f..ecd3a5ec6603e8e66136338bac21235e091a9269 100644 (file)
@@ -24,7 +24,7 @@
  * ***** END GPL LICENSE BLOCK *****
  */
 
-/** \file blender/depsgraph/intern/eval/deg_eval_flush.cc
+/** \file blender/depsgraph/intern/eval/deg_eval_flush.h
  *  \ingroup depsgraph
  *
  * Core routines for how the Depsgraph works.
index 78293f7f483268811bd05521c04c7c0281daa884..12d5ee00a6392e64ca26cc5b6b35ea3a8c53483e 100644 (file)
@@ -24,7 +24,7 @@
  * ***** END GPL LICENSE BLOCK *****
  */
 
-/** \file blender/depsgraph/intern/depsnode.cc
+/** \file blender/depsgraph/intern/nodes/deg_node.cc
  *  \ingroup depsgraph
  */
 
index d79d3d2348d4540eb361fd94699a036f236949e4..416996052c99157f5252efb4cdd8186abbf4591c 100644 (file)
@@ -24,7 +24,7 @@
  * ***** END GPL LICENSE BLOCK *****
  */
 
-/** \file blender/depsgraph/intern/depsnode.h
+/** \file depsgraph/intern/nodes/deg_node.h
  *  \ingroup depsgraph
  */
 
index 8e74317cfa23d3f0b2b555895aaaa9df0da781a5..f5f45dde519d47eaa756f0d7a22de56f85c8bfe3 100644 (file)
@@ -24,7 +24,7 @@
  * ***** END GPL LICENSE BLOCK *****
  */
 
-/** \file blender/depsgraph/intern/depsnode_component.cc
+/** \file blender/depsgraph/intern/nodes/deg_node_component.cc
  *  \ingroup depsgraph
  */
 
@@ -256,7 +256,7 @@ OperationDepsNode *ComponentDepsNode::get_entry_operation()
                entry_operation = op_node;
                return op_node;
        }
-       else if(operations.size() == 1) {
+       else if (operations.size() == 1) {
                return operations[0];
        }
        return NULL;
@@ -279,7 +279,7 @@ OperationDepsNode *ComponentDepsNode::get_exit_operation()
                exit_operation = op_node;
                return op_node;
        }
-       else if(operations.size() == 1) {
+       else if (operations.size() == 1) {
                return operations[0];
        }
        return NULL;
index 6ff4345d28b6eaeb50d00127c323740fcdfb6b46..6f62d91cd797da386f94a2a02f76c012ba393109 100644 (file)
@@ -24,7 +24,7 @@
  * ***** END GPL LICENSE BLOCK *****
  */
 
-/** \file blender/depsgraph/intern/depsnode_component.h
+/** \file blender/depsgraph/intern/nodes/deg_node_component.h
  *  \ingroup depsgraph
  */
 
index a9f9703bb3b4c72d1ddca8d67e6c885be76471cf..5847af29ac2459bb3e9707f415f46b017938ba41 100644 (file)
@@ -24,7 +24,7 @@
  * ***** END GPL LICENSE BLOCK *****
  */
 
-/** \file blender/depsgraph/intern/depsnode_operation.cc
+/** \file blender/depsgraph/intern/nodes/deg_node_operation.cc
  *  \ingroup depsgraph
  */
 
index f03078fc3dba538fe34c94ca8ed74b8453658981..598393054db56d9df7186221b2d54bf240f5daa0 100644 (file)
@@ -24,7 +24,7 @@
  * ***** END GPL LICENSE BLOCK *****
  */
 
-/** \file blender/depsgraph/intern/depsnode_operation.h
+/** \file blender/depsgraph/intern/nodes/deg_node_operation.h
  *  \ingroup depsgraph
  */
 
index 85e32144bcdaf7308ee87091216bc455488991c4..79961eae79d602f38134e7796a5aa64ffa60bb66 100644 (file)
@@ -1765,8 +1765,8 @@ void UI_panel_category_draw_all(ARegion *ar, const char *category_id_active)
                        /* tab highlight (3d look) */
                        glColor3ubv(is_active ? theme_col_tab_highlight : theme_col_tab_highlight_inactive);
                        ui_panel_category_draw_tab(GL_LINE_STRIP, rct->xmin, rct->ymin, rct->xmax, rct->ymax,
-                                                                          tab_curve_radius, roundboxtype, true, false,
-                                                                          is_active ? theme_col_back : theme_col_tab_inactive);
+                                                  tab_curve_radius, roundboxtype, true, false,
+                                                  is_active ? theme_col_back : theme_col_tab_inactive);
                }
 
                /* tab blackline */
index 3803221b4967afcb7a65671702e153e2ecae9833..b74c4b5f526b3f8da582a96d36d68db96bb73d36 100644 (file)
@@ -400,7 +400,7 @@ static int wm_collada_import_exec(bContext *C, wmOperator *op)
                C, filename,
                import_units,
                find_chains,
-                       auto_connect,
+               auto_connect,
                fix_orientation,
                min_chain_length))
        {
index 0fd56fbcc4e7e4145fc99669a90e10decb67e73e..a84b8d9dcc82f21644b5c82fb2793698aa754a2c 100644 (file)
@@ -2283,7 +2283,7 @@ static void knife_make_face_cuts(KnifeTool_OpData *kcd, BMFace *f, ListBase *kfe
 
        BMEdge **edge_array = BLI_array_alloca(edge_array, edge_array_len);
 
-        /* point to knife edges we've created edges in, edge_array aligned */
+       /* point to knife edges we've created edges in, edge_array aligned */
        KnifeEdge **kfe_array = BLI_array_alloca(kfe_array, edge_array_len);
 
        BLI_assert(BLI_gset_size(kcd->edgenet.edge_visit) == 0);
index 9e71e646b1a4387d5056367642f1cf83692863b6..8868827a11fb23ac631fc7cf3521ef17638bf1df 100644 (file)
@@ -463,7 +463,7 @@ static void edbm_tagged_loop_pairs_do_fill_faces(BMesh *bm, UnorderedLoopPair *u
                if ((ulp->l_pair[0]    && ulp->l_pair[1]) &&
                    (ulp->l_pair[0]->e != ulp->l_pair[1]->e))
                {
-                        /* time has come to make a face! */
+                       /* time has come to make a face! */
                        BMVert *v_shared = BM_edge_share_vert(ulp->l_pair[0]->e, ulp->l_pair[1]->e);
                        BMFace *f, *f_example = ulp->l_pair[0]->f;
                        BMLoop *l_iter;
index 3da3a451d66b04f05165a9aeddc058e2fe71a90c..01535eac422ad53366ca6440e3cc0a0a16d61fde 100644 (file)
@@ -2288,7 +2288,7 @@ static int remove_tagged_particles(Object *ob, ParticleSystem *psys, int mirror)
                        npoint= new_points= MEM_callocN(new_totpart * sizeof(PTCacheEditPoint), "PTCacheEditKey array");
 
                        if (ELEM(NULL, new_pars, new_points)) {
-                                /* allocation error! */
+                               /* allocation error! */
                                if (new_pars)
                                        MEM_freeN(new_pars);
                                if (new_points)
index 8db5a8f9bd31aaf17c184261aa6a40826301736c..06caf930988c883bd39bfaa33e13cf13d82167ee 100644 (file)
@@ -2979,7 +2979,7 @@ static void image_sample_apply(bContext *C, wmOperator *op, const wmEvent *event
                if (ibuf->zbuf) {
                        info->z = ibuf->zbuf[y * ibuf->x + x];
                        info->zp = &info->z;
-                       if (ibuf->zbuf == (int*)ibuf->rect) {
+                       if (ibuf->zbuf == (int *)ibuf->rect) {
                                info->colp = NULL;
                        }
                }
index 07e8325756f983efa458255040fbaedb549c8d41..7c12b8ea7a59d01916b29963630301b9b0bf038f 100644 (file)
@@ -3744,7 +3744,7 @@ static void draw_em_fancy(Scene *scene, ARegion *ar, View3D *v3d,
        }
 
        if ((dt > OB_WIRE) && (v3d->flag2 & V3D_RENDER_SHADOW)) {
-           /* pass */
+               /* pass */
        }
        else {
                /* annoying but active faces is stored differently */
index c25ea33109d477a0b7136e3bd8e48c547f790070..1bd0ec23d6571f1ecaac69e6b70bdf9342aafac5 100644 (file)
@@ -3620,7 +3620,7 @@ static int view3d_zoom_border_exec(bContext *C, wmOperator *op)
                dist_range[0] = v3d->near * 1.5f;
        }
        else { /* othographic */
-                  /* find the current window width and height */
+               /* find the current window width and height */
                vb[0] = ar->winx;
                vb[1] = ar->winy;
 
index e1cf743623668207013c7cccd992cf69df0ead1c..d9b12bb0b186143db89e88fd7845b68a03eeeb3c 100644 (file)
@@ -599,15 +599,15 @@ static void initSnappingMode(TransInfo *t)
        if (t->spacetype == SPACE_VIEW3D) {
                if (t->tsnap.object_context == NULL) {
                        t->tsnap.object_context = ED_transform_snap_object_context_create_view3d(
-                                       G.main, t->scene, SNAP_OBJECT_USE_CACHE,
-                                       t->ar, t->view);
+                               G.main, t->scene, SNAP_OBJECT_USE_CACHE,
+                               t->ar, t->view);
 
                        ED_transform_snap_object_context_set_editmesh_callbacks(
-                                       t->tsnap.object_context,
-                                       (bool (*)(BMVert *, void *))BM_elem_cb_check_hflag_disabled,
-                                       bm_edge_is_snap_target,
-                                       bm_face_is_snap_target,
-                                       SET_UINT_IN_POINTER((BM_ELEM_SELECT | BM_ELEM_HIDDEN)));
+                               t->tsnap.object_context,
+                               (bool (*)(BMVert *, void *))BM_elem_cb_check_hflag_disabled,
+                               bm_edge_is_snap_target,
+                               bm_face_is_snap_target,
+                               SET_UINT_IN_POINTER((BM_ELEM_SELECT | BM_ELEM_HIDDEN)));
                }
        }
 }
index 3f29d9899e8d93e5f0e16094fb25da2a36642aff..9efbe6b53bec4cf01d7c38e687458fe8587e0c08 100644 (file)
@@ -111,7 +111,7 @@ static PyObject *FrsNoise_drand(BPy_FrsNoise * /*self*/, PyObject *args, PyObjec
                PyErr_SetString(PyExc_TypeError, "optional argument 1 must be of type int");
                return NULL;
        }
-       if (seed){
+       if (seed) {
                RandGen::srand48(seed);
        }
        return PyFloat_FromDouble(RandGen::drand48());
index f998dc9904e0361967e12dca7b560f9ebb2703fd..89816b09024fa6867b26fe3b2c5c930ec7de0416 100644 (file)
@@ -91,7 +91,6 @@
 
 #ifdef WITH_OPENSUBDIV
 #  include "BKE_subsurf.h"
-#  include "BKE_DerivedMesh.h"
 #  include "BKE_editmesh.h"
 
 #  include "gpu_codegen.h"
index 68741578f276a1a9b8861f0d6d38b7458ef545f4..52e40cbc098a6b97af5772893c3f7d70a4f06b1d 100644 (file)
@@ -85,8 +85,8 @@ typedef struct Camera {
        char sensor_fit;
        char pad[7];
 
-        /* Stereo settings */
-        struct CameraStereoSettings stereo;
+       /* Stereo settings */
+       struct CameraStereoSettings stereo;
 } Camera;
 
 /* **************** CAMERA ********************* */
index 4f19e8196259e1d3d82c6a9e8d592212ff573b98..b8783da73cac14c14b3498a8485cce9c84c24280 100644 (file)
@@ -1148,7 +1148,7 @@ void DNA_struct_switch_endian(SDNA *oldsdna, int oldSDNAnr, char *data)
 
                /* test: is type a struct? */
                if (spc[0] >= firststructtypenr && !ispointer(name)) {
-                 /* struct field type */
+                       /* struct field type */
                        /* where does the old data start (is there one?) */
                        cpo = find_elem(oldsdna, type, name, spo, data, NULL);
                        if (cpo) {
index c3c66625c84c10d85fdd1a825492ce416c12040c..1d3537dc9a08abc108d9f37c3d7b4671e2783ea7 100644 (file)
@@ -196,7 +196,7 @@ static void rna_Scene_collada_export(
 
         int use_ngons,
         int use_object_instantiation,
-               int use_blender_profile,
+        int use_blender_profile,
         int sort_by_name,
         int export_transformation_type,
         int open_sim)
index b22f5b662ba09a2fa828c5a2d7abbc4d2aec3fef..5b65a2bbfd40940ee479c90e0b9337817e02f383 100644 (file)
@@ -330,7 +330,7 @@ static void ntree_shader_link_builtin_group_normal(
        node_group_input_verify(group_ntree, group_input_node, &group_ntree->id);
        ntreeUpdateTree(G.main, group_ntree);
        /* Assumes sockets are always added at the end. */
-       bNodeSocket *group_node_normal_socket = (bNodeSocket*)group_node->inputs.last;
+       bNodeSocket *group_node_normal_socket = group_node->inputs.last;
        if (displacement_node == group_node) {
                /* If displacement is coming from this node group we need to perform
                 * some internal re-linking in order to avoid cycles.
index 57014bdc4764470a894209ac13b28187b8572295..48d1688c38611101fb22a0b7f88365f780df74c9 100644 (file)
@@ -172,7 +172,8 @@ static int gpu_shader_normal_map(GPUMaterial *mat, bNode *node, bNodeExecData *U
                                break;
                }
 
-       } else {
+       }
+       else {
 
                /* ************** BLENDER INTERNAL without world space shading flag ******* */
 
index 14dc0d71b836c6fd195dd81070f58b87c4a1b69c..4751e60996d270b8820fca8947bee3cd7455b0f4 100644 (file)
@@ -1366,7 +1366,7 @@ static void BL_CreatePhysicsObjectNew(KX_GameObject* gameobj,
        /* When the parent is not OB_DYNAMIC and has no OB_COLLISION then it gets no bullet controller
         * and cant be apart of the parents compound shape, same goes for OB_SOFT_BODY */
        if (parent && (parent->gameflag & (OB_DYNAMIC | OB_COLLISION))) {
-               if(parent->gameflag & OB_CHILD)!=0 && (blenderobject->gameflag & OB_CHILD) && !(parent->gameflag & OB_SOFT_BODY)) {
+               if ((parent->gameflag & OB_CHILD)!=0 && (blenderobject->gameflag & OB_CHILD) && !(parent->gameflag & OB_SOFT_BODY)) {
                        isCompoundChild = true;
                }
        }
index 455fef0aceb257b2bde7ac19948e3aeb9bb8f77d..974dcbca95bba2f83e669c57576fe21de422061c 100644 (file)
@@ -394,8 +394,9 @@ void BL_ConvertActuators(const char* maggiename,
                                                soundActuatorType);
 
                                        // if we made it mono, we have to free it
-                                       if(sound && snd_sound && snd_sound != sound->playback_handle)
+                                       if (sound && snd_sound && snd_sound != sound->playback_handle) {
                                                AUD_Sound_free(snd_sound);
+                                       }
 
                                        tmpsoundact->SetName(bact->name);
                                        baseact = tmpsoundact;
index dd612a08494f95f19a964d4e64c1e6d23267f7b7..32dc79cf6eb9145b3d7b9dc3df1ea3b696939828 100644 (file)
@@ -73,7 +73,7 @@ typedef struct {
                wlink.warn_done = true;                                               \
                wlink.link = NULL;                                                    \
                                                                                      \
-               if(wlink_last) {                                                      \
+               if (wlink_last) {                                                     \
                        wlink_last->link= (void *)&(wlink);                               \
                        PyObjectPlus::SetDeprecationWarningLinkLast(&(wlink));            \
                }                                                                     \
@@ -195,7 +195,7 @@ public:                                                                       \
        PyObject *Py##method_name(PyObject *args, PyObject *kwds);                 \
        static PyObject *                                                          \
        sPy##method_name(PyObject *self, PyObject *args, PyObject *kwds) {         \
-               if(BGE_PROXY_REF(self)==NULL) {                                        \
+               if (BGE_PROXY_REF(self)==NULL) {                                       \
                        PyErr_SetString(PyExc_RuntimeError,                                \
                                        #class_name "." #method_name "() - "               \
                                        BGE_PROXY_ERROR_MSG);                              \
@@ -208,7 +208,7 @@ public:                                                                       \
        PyObject *Py##method_name(PyObject *args);                                 \
        static PyObject*                                                           \
        sPy##method_name(PyObject *self, PyObject *args) {                         \
-               if(BGE_PROXY_REF(self)==NULL) {                                        \
+               if (BGE_PROXY_REF(self)==NULL) {                                       \
                        PyErr_SetString(PyExc_RuntimeError,                                \
                                        #class_name "." #method_name "() - "               \
                                        BGE_PROXY_ERROR_MSG); return NULL;                 \
@@ -220,7 +220,7 @@ public:                                                                       \
        PyObject *Py##method_name();                                               \
        static PyObject*                                                           \
        sPy##method_name(PyObject *self) {                                         \
-               if(BGE_PROXY_REF(self)==NULL) {                                        \
+               if (BGE_PROXY_REF(self)==NULL) {                                       \
                        PyErr_SetString(PyExc_RuntimeError,                                \
                                        #class_name "." #method_name "() - "               \
                                        BGE_PROXY_ERROR_MSG); return NULL;                 \
@@ -232,7 +232,7 @@ public:                                                                       \
        PyObject *Py##method_name(PyObject *value);                                \
        static PyObject*                                                           \
        sPy##method_name(PyObject *self, PyObject *value) {                        \
-               if(BGE_PROXY_REF(self)==NULL) {                                        \
+               if (BGE_PROXY_REF(self)==NULL) {                                       \
                        PyErr_SetString(PyExc_RuntimeError,                                \
                                        #class_name "." #method_name "(value) - "          \
                                        BGE_PROXY_ERROR_MSG); return NULL;                 \
@@ -244,7 +244,7 @@ public:                                                                       \
        PyObject *Py##method_name(PyObject *args, PyObject *kwds);                 \
        static PyObject*                                                           \
        sPy##method_name(PyObject *self, PyObject *args, PyObject *kwds) {         \
-               if(BGE_PROXY_REF(self)==NULL) {                                        \
+               if (BGE_PROXY_REF(self)==NULL) {                                       \
                        PyErr_SetString(PyExc_RuntimeError,                                \
                                        #class_name "." #method_name "(...) - "            \
                                        BGE_PROXY_ERROR_MSG); return NULL;                 \
@@ -257,7 +257,7 @@ public:                                                                       \
        PyObject *Py##method_name(PyObject *args);                                 \
        static PyObject*                                                           \
        sPy##method_name(PyObject *self, PyObject *args) {                         \
-               if(BGE_PROXY_REF(self)==NULL) {                                        \
+               if (BGE_PROXY_REF(self)==NULL) {                                       \
                        PyErr_SetString(PyExc_RuntimeError,                                \
                                        #class_name "." #method_name "(...) - "            \
                                        BGE_PROXY_ERROR_MSG);                              \
@@ -271,7 +271,7 @@ public:                                                                       \
        PyObject *Py##method_name(PyObject *value);                                \
        static PyObject *                                                          \
        sPy##method_name(PyObject *self, PyObject *value) {                        \
-               if(BGE_PROXY_REF(self)==NULL) {                                        \
+               if (BGE_PROXY_REF(self)==NULL) {                                       \
                        PyErr_SetString(PyExc_RuntimeError,                                \
                                        #class_name "." #method_name "(value) - "          \
                                        BGE_PROXY_ERROR_MSG);                              \
@@ -285,7 +285,7 @@ public:                                                                       \
        PyObject *Py##method_name();                                               \
        static PyObject *                                                          \
        sPy##method_name(PyObject *self) {                                         \
-               if(BGE_PROXY_REF(self)==NULL) {                                        \
+               if (BGE_PROXY_REF(self)==NULL) {                                       \
                        PyErr_SetString(PyExc_RuntimeError,                                \
                                        #class_name "." #method_name "() - "               \
                                        BGE_PROXY_ERROR_MSG);                              \
index 82f3bee86b2ab85929242cd103a543f276d954cf..abb64cf1733efc46f02a9b95aba0cbfc80dd4eba 100644 (file)
@@ -199,7 +199,7 @@ bool        SCA_PropertySensor::CheckPropertyCondition()
                                const float max = m_checkpropmaxval.ToFloat();
                                float val;
 
-                               if (orgprop->GetValueType() == VALUE_STRING_TYPE){
+                               if (orgprop->GetValueType() == VALUE_STRING_TYPE) {
                                        val = orgprop->GetText().ToFloat();
                                }
                                else {
@@ -240,7 +240,7 @@ bool        SCA_PropertySensor::CheckPropertyCondition()
                                const float ref = m_checkpropval.ToFloat();
                                float val;
 
-                               if (orgprop->GetValueType() == VALUE_STRING_TYPE){
+                               if (orgprop->GetValueType() == VALUE_STRING_TYPE) {
                                        val = orgprop->GetText().ToFloat();
                                }
                                else {
index 69c1af35bd9d59fa94890e6db4f20b4b138cc718..3244400e1bd04386a0afbdc8b10ab7935da245fe 100644 (file)
@@ -142,7 +142,7 @@ KX_GameObject::~KX_GameObject()
        }
        // Unregister collision callbacks
        // Do this before we start freeing physics information like m_pClient_info
-       if (m_collisionCallbacks){
+       if (m_collisionCallbacks) {
                UnregisterCollisionCallbacks();
                Py_CLEAR(m_collisionCallbacks);
        }
@@ -1564,7 +1564,7 @@ void KX_GameObject::UnregisterCollisionCallbacks()
        PHY_IPhysicsEnvironment* pe = scene->GetPhysicsEnvironment();
        PHY_IPhysicsController* spc = GetPhysicsController();
        // If we are the last to unregister on this physics controller
-       if (pe->RemoveCollisionCallback(spc)){
+       if (pe->RemoveCollisionCallback(spc)) {
                // If we are a sensor object
                if (m_pClient_info->isSensor())
                        // Remove sensor body from physics world
@@ -1584,7 +1584,7 @@ void KX_GameObject::RegisterCollisionCallbacks()
        PHY_IPhysicsEnvironment* pe = scene->GetPhysicsEnvironment();
        PHY_IPhysicsController* spc = GetPhysicsController();
        // If we are the first to register on this physics controller
-       if (pe->RequestCollisionCallback(spc)){
+       if (pe->RequestCollisionCallback(spc)) {
                // If we are a sensor object
                if (m_pClient_info->isSensor())
                        // Add sensor body to physics world
index 9ccf60b15ce0bd1ea21589abdc77825c2c96988d..5f490747c2b4f38468cf72a817535f083df4051c 100644 (file)
@@ -195,7 +195,7 @@ int KX_LightObject::pyattr_set_layer(void *self_v, const KX_PYATTRIBUTE_DEF *att
                PyErr_Format(PyExc_TypeError, "expected an integer greater than 1 for attribute \"%s\"", attrdef->m_name);
                return PY_SET_ATTR_FAIL;
        }
-       else if(layer > MAX_LIGHT_LAYERS) {
+       else if (layer > MAX_LIGHT_LAYERS) {
                PyErr_Format(PyExc_TypeError, "expected an integer less than %i for attribute \"%s\"", MAX_LIGHT_LAYERS, attrdef->m_name);
                return PY_SET_ATTR_FAIL;
        }
index 47ba2c4343fef5350a2012348a60140d3e02421c..c0d99d16a4cc85adb61acfd53eab275621bb9a68 100644 (file)
@@ -1785,7 +1785,7 @@ void KX_Scene::UpdateObjectLods(void)
 
        for (int i = 0; i < this->GetObjectList()->GetCount(); i++) {
                gameobj = (KX_GameObject*) GetObjectList()->GetValue(i);
-               if (!gameobj->GetCulled()){
+               if (!gameobj->GetCulled()) {
                        gameobj->UpdateLod(cam_pos);
                }
        }
index 1c42d65ae751174c18cce5a2cf480b2a9208359c..a27f37c0441343f10e1325942c6559ab451c63c5 100644 (file)
@@ -79,21 +79,18 @@ KX_SoundActuator::KX_SoundActuator(SCA_IObject* gameobj,
 
 KX_SoundActuator::~KX_SoundActuator()
 {
-       if(m_handle)
-       {
+       if (m_handle) {
                AUD_Handle_stop(m_handle);
        }
 
-       if(m_sound)
-       {
+       if (m_sound) {
                AUD_Sound_free(m_sound);
        }
 }
 
 void KX_SoundActuator::play()
 {
-       if(m_handle)
-       {
+       if (m_handle) {
                AUD_Handle_stop(m_handle);
                m_handle = NULL;
        }
@@ -130,10 +127,8 @@ void KX_SoundActuator::play()
        if(sound != m_sound)
                AUD_Sound_free(sound);
 
-       if (m_handle != NULL)
-       {
-               if (m_is3d)
-               {
+       if (m_handle != NULL) {
+               if (m_is3d) {
                        AUD_Handle_setRelative(m_handle, true);
                        AUD_Handle_setVolumeMaximum(m_handle, m_3d.max_gain);
                        AUD_Handle_setVolumeMinimum(m_handle, m_3d.min_gain);
index beccdfaad93db038e6fa5e735e1174acd59db087..a8fa9b0815da99872bb7ee85bb2f4e90ea6a10f7 100644 (file)
@@ -207,7 +207,7 @@ static MT_Matrix3x3 vectomat(MT_Vector3 vec, short axis, short upflag, short thr
        vec = vec.safe_normalized_vec(z);
 
        /* if 2D doesn't move the up vector */
-       if (!threedimup){
+       if (!threedimup) {
                vec.setValue(MT_Scalar(vec[0]), MT_Scalar(vec[1]), MT_Scalar(0.0f));
                vec = (vec - z.dot(vec)*z).safe_normalized_vec(z);
        }
index c1af6de127e70064f4eaf7f0b4c351e2a9b644f4..ddae645802ce6b9ec7515eeb8aa4720f0e726cd3 100644 (file)
@@ -89,17 +89,17 @@ PyObject *KX_VehicleWrapper::PyAddWheel(PyObject *args)
                if (gameOb->GetSGNode())
                {
                        MT_Vector3 attachPos,attachDir,attachAxle;
-                       if(!PyVecTo(pylistPos,attachPos)) {
+                       if (!PyVecTo(pylistPos,attachPos)) {
                                PyErr_SetString(PyExc_AttributeError,
                                                "addWheel(...) Unable to add wheel. attachPos must be a vector with 3 elements.");
                                return NULL;
                        }
-                       if(!PyVecTo(pylistDir,attachDir))  {
+                       if (!PyVecTo(pylistDir,attachDir))  {
                                PyErr_SetString(PyExc_AttributeError,
                                                "addWheel(...) Unable to add wheel. downDir must be a vector with 3 elements.");
                                return NULL;
                        }
-                       if(!PyVecTo(pylistAxleDir,attachAxle)) {
+                       if (!PyVecTo(pylistAxleDir,attachAxle)) {
                                PyErr_SetString(PyExc_AttributeError,
                                                "addWheel(...) Unable to add wheel. axleDir must be a vector with 3 elements.");
                                return NULL;
@@ -108,7 +108,7 @@ PyObject *KX_VehicleWrapper::PyAddWheel(PyObject *args)
                        //someone reverse some conventions inside Bullet (axle winding)
                        attachAxle = -attachAxle;
                        
-                       if(wheelRadius<=0) {
+                       if (wheelRadius <= 0) {
                                PyErr_SetString(PyExc_AttributeError,
                                                "addWheel(...) Unable to add wheel. wheelRadius must be positive.");
                                return NULL;
index 58ea5e2e39090832787a562bed0ca05a3a8b228f..7138409a7e80b8406ff2b3ead46b410ac9ec2ba2 100644 (file)
@@ -430,7 +430,7 @@ public:
 
        // PHY_ICharacter interface
        virtual void Jump()     { jump(); }
-       virtual bool OnGround(){ return onGround(); }
+       virtual bool OnGround() { return onGround(); }
        virtual float GetGravity() { return getGravity(); }
        virtual void SetGravity(float gravity) { setGravity(gravity); }
        virtual unsigned char GetMaxJumps() { return getMaxJumps(); }
index 81c567ef08a0734e21ed9a409478f1cdd73fef4e..1a924904b7dd781d5f15c5d1525f46b10de5d586 100644 (file)
@@ -15,7 +15,7 @@
 class PHY_ICharacter
 {
 public:        
-       virtual ~PHY_ICharacter(){};
+       virtual ~PHY_ICharacter() {};
 
        virtual void Jump()= 0;
        virtual bool OnGround()= 0;
index 284d77ca22122682b53dab6f6d3fd257ce35775d..741fae8d2ad5ab67d3293b75268e83a9f5db6bd2 100644 (file)
@@ -48,7 +48,7 @@ class PHY_IPhysicsEnvironment;
 class PHY_IController
 {
        public:
-               virtual ~PHY_IController(){};
+               virtual ~PHY_IController() {};
                // clientinfo for raycasts for example
                virtual void*   GetNewClientInfo()=0;
                virtual void    SetNewClientInfo(void* clientinfo)=0;
index d40b8da945154107f00073daec5631d22f4f48e4..e803d658713bc1a482239f0c83ae43d060b49097 100644 (file)
@@ -44,7 +44,7 @@ class PHY_IMotionState
 
 {
        public:
-               virtual ~PHY_IMotionState(){};
+               virtual ~PHY_IMotionState() {};
 
                virtual void    GetWorldPosition(float& posX,float& posY,float& posZ)=0;
                virtual void    GetWorldScaling(float& scaleX,float& scaleY,float& scaleZ)=0;
index 62b163536ddbce714cbe567310add73ef655fadc..4c6e8c71ef7edd65b9dcb6057047fa6634d3361a 100644 (file)
@@ -53,7 +53,7 @@ class PHY_IPhysicsController : public PHY_IController
 {
 
        public:
-               virtual ~PHY_IPhysicsController(){};
+               virtual ~PHY_IPhysicsController() {};
                /**
                 * SynchronizeMotionStates ynchronizes dynas, kinematic and deformable entities (and do 'late binding')
                 */
index 2997048805f960b20589b5a8d83ac65e98ad67cf..72ec7b1edd0b4ea66d2cabff63d628bc9f7d47ff 100644 (file)
@@ -116,7 +116,7 @@ public:
 class PHY_IPhysicsEnvironment
 {
        public:
-               virtual         ~PHY_IPhysicsEnvironment(){}
+               virtual         ~PHY_IPhysicsEnvironment() {}
                virtual void            BeginFrame() = 0;
                virtual void            EndFrame() = 0;
                /// Perform an integration step of duration 'timeStep'.
index 1dcec69a335971b4aac8c7daa6951d0291fa63ca..7e4a49e923e4a96763ff327f9b5c28fe1f1ed8d9 100644 (file)
@@ -18,7 +18,7 @@ class PHY_IMotionState;
 class PHY_IVehicle
 {
 public:
-       virtual ~PHY_IVehicle(){};
+       virtual ~PHY_IVehicle() {};
        
        virtual void    AddWheel(
                        PHY_IMotionState* motionState,
index 34fdca23ee6dec76d86d4e0212a95608f380f8d0..a5a3170ed77f80159a92336d9f92bf906e70505c 100644 (file)
@@ -45,7 +45,7 @@ public:
 
        virtual void    IndexPrimitives(RAS_MeshSlot& ms);
 
-       virtual void    SetDrawingMode(int drawingmode){m_drawingmode=drawingmode;};
+       virtual void    SetDrawingMode(int drawingmode) {m_drawingmode = drawingmode;};
 
 protected:
        int                             m_drawingmode;
index 9cb3449bed5600cad517516ce866793b06bca42f..4c8e4a8931c4e7d1b5bbfc3070f963b971057427 100644 (file)
@@ -76,7 +76,7 @@ public:
 
        virtual void    IndexPrimitives(RAS_MeshSlot& ms);
 
-       virtual void    SetDrawingMode(int drawingmode){m_drawingmode=drawingmode;};
+       virtual void    SetDrawingMode(int drawingmode) {m_drawingmode = drawingmode;};
 
 protected:
        int                             m_drawingmode;