Cleanup: code-style, duplicate header
authorCampbell Barton <ideasman42@gmail.com>
Wed, 1 Mar 2017 13:16:36 +0000 (00:16 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 1 Mar 2017 13:16:36 +0000 (00:16 +1100)
15 files changed:
source/blender/blenkernel/intern/appdir.c
source/blender/blenkernel/intern/tracking_stabilize.c
source/blender/editors/animation/anim_channels_defines.c
source/blender/editors/armature/armature_naming.c
source/blender/editors/gpencil/gpencil_edit.c
source/blender/editors/render/render_opengl.c
source/blender/editors/space_clip/tracking_ops.c
source/blender/editors/space_sequencer/sequencer_draw.c
source/blender/editors/space_view3d/drawvolume.c
source/blender/makesrna/intern/rna_define.c
source/blender/makesrna/intern/rna_smoke.c
source/blender/modifiers/intern/MOD_dynamicpaint.c
source/blender/nodes/shader/nodes/node_shader_fresnel.c
source/blender/nodes/shader/nodes/node_shader_layer_weight.c
source/blender/nodes/shader/nodes/node_shader_tex_brick.c

index 9236a1b58531b16a89f6e2fd5738643c93e6b7b0..f2f0a92d8b36f2c39ad672f36d8d591d807dfc56 100644 (file)
@@ -755,7 +755,6 @@ static void where_is_temp(char *fullname, char *basename, const size_t maxlen, c
 void BKE_tempdir_init(char *userdir)
 {
        where_is_temp(btempdir_session, btempdir_base, FILE_MAX, userdir);
-;
 }
 
 /**
index 36b24fbb2dc3819586ade8bd7c1e27251b581f4c..722fc89a75fc45b1097d2d6707b7574d99410cf8 100644 (file)
@@ -1167,7 +1167,8 @@ static void stabilization_calculate_data(StabContext *ctx,
 
        if (ctx->stab->flag & TRACKING_STABILIZE_SCALE) {
                *r_scale = expf(scale_step * scaleinf);  /* Averaged in log scale */
-       } else {
+       }
+       else {
                *r_scale = 1.0f;
        }
 
@@ -1180,8 +1181,8 @@ static void stabilization_calculate_data(StabContext *ctx,
         */
        get_animated_target_pos(ctx, framenr, target_pos);
        sub_v2_v2(r_translation, target_pos);
-       *r_angle -= get_animated_target_rot(ctx,framenr);
-       target_scale = get_animated_target_scale(ctx,framenr);
+       *r_angle -= get_animated_target_rot(ctx, framenr);
+       target_scale = get_animated_target_scale(ctx, framenr);
        if (target_scale != 0.0f) {
                *r_scale /= target_scale;
                /* target_scale is an expected/intended reference zoom value */
index 57302c18a8887b5e64ef30fd0b84043565649c5e..4d4f8c1298a107eb9b25e02acc904d219a76e07d 100644 (file)
@@ -3856,7 +3856,8 @@ void ANIM_channel_draw(bAnimContext *ac, bAnimListElem *ale, float yminc, float
        if (ac->sl) {
                if ((ac->spacetype == SPACE_IPO) &&
                    (acf->has_setting(ac, ale, ACHANNEL_SETTING_VISIBLE) ||
-                    acf->has_setting(ac, ale, ACHANNEL_SETTING_ALWAYS_VISIBLE))) {
+                    acf->has_setting(ac, ale, ACHANNEL_SETTING_ALWAYS_VISIBLE)))
+               {
                        /* for F-Curves, draw color-preview of curve behind checkbox */
                        if (ELEM(ale->type, ANIMTYPE_FCURVE, ANIMTYPE_NLACURVE)) {
                                FCurve *fcu = (FCurve *)ale->data;
index fa192ed6f360e5caf237ffd2b71796f0cdd9747a..c928508237da5b3bc16b6082a6ce5accee99bd3f 100644 (file)
@@ -362,7 +362,7 @@ static int armature_flip_names_exec(bContext *C, wmOperator *UNUSED(op))
 
        arm = ob->data;
 
-       ListBase bones_names= {NULL};
+       ListBase bones_names = {NULL};
 
        CTX_DATA_BEGIN(C, EditBone *, ebone, selected_editable_bones)
        {
index e118e490f25e96e49ab225fe66d26ffde17b6c13..fa9acc36a2b5c2439ab8ceed2a84002257621ecc 100644 (file)
@@ -74,7 +74,6 @@
 #include "ED_object.h"
 #include "ED_screen.h"
 #include "ED_view3d.h"
-#include "ED_screen.h"
 #include "ED_space_api.h"
 
 #include "gpencil_intern.h"
index 55c071402160a27b9de65835615522e74b4c168a..24e8af1c6eccb7e420d448f633af0a93dda9b8e6 100644 (file)
@@ -315,7 +315,7 @@ static void screen_opengl_render_doit(OGLRender *oglrender, RenderResult *rr)
                        RE_render_result_rect_from_ibuf(rr, &scene->r, out, oglrender->view_id);
                        IMB_freeImBuf(out);
                }
-               else if (gpd){
+               else if (gpd) {
                        /* If there are no strips, Grease Pencil still needs a buffer to draw on */
                        ImBuf *out = IMB_allocImBuf(oglrender->sizex, oglrender->sizey, 32, IB_rect);
                        RE_render_result_rect_from_ibuf(rr, &scene->r, out, oglrender->view_id);
index d28cbe5fb1d5791cc005e45e42c37da9b5203b02..169eb76399ba1a52572e56bf92d08dbdb826e1d9 100644 (file)
@@ -1534,7 +1534,8 @@ static int join_tracks_exec(bContext *C, wmOperator *op)
                                update_stabilization = true;
                                if ((act_track->flag & TRACK_USE_2D_STAB) == 0) {
                                        act_track->flag |= TRACK_USE_2D_STAB;
-                               } else {
+                               }
+                               else {
                                        stab->tot_track--;
                                }
                                BLI_assert(0 <= stab->tot_track);
@@ -1543,7 +1544,8 @@ static int join_tracks_exec(bContext *C, wmOperator *op)
                                update_stabilization = true;
                                if ((act_track->flag & TRACK_USE_2D_STAB_ROT) == 0) {
                                        act_track->flag |= TRACK_USE_2D_STAB_ROT;
-                               } else {
+                               }
+                               else {
                                        stab->tot_rot_track--;
                                }
                                BLI_assert(0 <= stab->tot_rot_track);
index e1768e4aedc735bb30c698215b1d88b0239fb58e..70a6e6d83cb8f87f0b5c4701ba91afd0170dc957 100644 (file)
@@ -545,7 +545,8 @@ static void draw_seq_text(View2D *v2d, SpaceSeq *sseq, Sequence *seq, float x1,
                if ((sseq->flag & SEQ_ALL_WAVEFORMS) || (seq->flag & SEQ_AUDIO_DRAW_WAVEFORM)) {
                        str[0] = 0;
                        str_len = 0;
-               } else if (seq->sound) {
+               }
+               else if (seq->sound) {
                        str_len = BLI_snprintf(str, sizeof(str), "%s: %s | %d",
                                               name, seq->sound->name, seq->len);
                }
index 27ecbf83db54c42bc1964d0300e37c26d4fa6910..182dc214f8e862010718b0403c3a3667e1e59b97 100644 (file)
@@ -774,8 +774,8 @@ void draw_smoke_velocity(SmokeDomainSettings *domain, float viewnormal[3])
 
        float min[3] = {
            domain->p0[0] - domain->cell_size[0] * domain->adapt_res,
-               domain->p0[1] - domain->cell_size[1] * domain->adapt_res,
-               domain->p0[2] - domain->cell_size[2] * domain->adapt_res,
+           domain->p0[1] - domain->cell_size[1] * domain->adapt_res,
+           domain->p0[2] - domain->cell_size[2] * domain->adapt_res,
        };
 
        int num_points_v[3] = {
index dc97d39052b4f90257de06b9a466f4efb222e42e..1d232d2df3941992acdba79f9a687dcec2b7deed 100644 (file)
@@ -3157,8 +3157,9 @@ int rna_parameter_size(PropertyRNA *parm)
                                        StringPropertyRNA *sparm = (StringPropertyRNA *)parm;
                                        return sizeof(char) * sparm->maxlength;
                                }
-                               else
+                               else {
                                        return sizeof(char *);
+                               }
                        case PROP_POINTER:
                        {
 #ifdef RNA_RUNTIME
index 6db370fc1526cfcfeb23722625c73ae1062dec1f..c12937bd2bf211856a03016edff349d6b550aaca 100644 (file)
@@ -832,14 +832,14 @@ static void rna_def_smoke_domain_settings(BlenderRNA *brna)
            {FLUID_FIELD_COLOR_R, "COLOR_R", 0, "Red", "Red component of the color field"},
            {FLUID_FIELD_COLOR_G, "COLOR_G", 0, "Green", "Green component of the color field"},
            {FLUID_FIELD_COLOR_B, "COLOR_B", 0, "Blue", "Blue component of the color field"},
-               {FLUID_FIELD_DENSITY, "DENSITY", 0, "Density", "Quantity of soot in the fluid"},
+           {FLUID_FIELD_DENSITY, "DENSITY", 0, "Density", "Quantity of soot in the fluid"},
            {FLUID_FIELD_FLAME, "FLAME", 0, "Flame", "Flame field"},
            {FLUID_FIELD_FUEL, "FUEL", 0, "Fuel", "Fuel field"},
            {FLUID_FIELD_HEAT, "HEAT", 0, "Heat", "Temperature of the fluid"},
            {FLUID_FIELD_VELOCITY_X, "VELOCITY_X", 0, "X Velocity", "X component of the velocity field"},
            {FLUID_FIELD_VELOCITY_Y, "VELOCITY_Y", 0, "Y Velocity", "Y component of the velocity field"},
            {FLUID_FIELD_VELOCITY_Z, "VELOCITY_Z", 0, "Z Velocity", "Z component of the velocity field"},
-               {0, NULL, 0, NULL, NULL}
+           {0, NULL, 0, NULL, NULL}
        };
 
        prop = RNA_def_property(srna, "coba_field", PROP_ENUM, PROP_NONE);
index 05068b9b59773a87ab172769601089d9e7b10b04..bb75d65580243a3e02454a8e72ee9e24cf18be09 100644 (file)
@@ -116,7 +116,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
 
 static bool is_brush_cb(Object *UNUSED(ob), ModifierData *pmd)
 {
-       return ((DynamicPaintModifierData*)pmd)->brush != NULL;
+       return ((DynamicPaintModifierData *)pmd)->brush != NULL;
 }
 
 static void updateDepgraph(ModifierData *md, DagForest *forest,
index d5e11795fc01cf96cf5e764e2cf7b300aed68d87..5a9e33a40538571b692408fe0a2648130aa868c2 100644 (file)
@@ -64,10 +64,11 @@ static void node_shader_exec_fresnel(void *data, int UNUSED(thread), bNode *UNUS
                copy_v3_v3(n, shi->vn);
        }
 
-       if(shi->use_world_space_shading)
+       if (shi->use_world_space_shading) {
                mul_mat3_m4_v3((float (*)[4])RE_render_current_get_matrix(RE_VIEW_MATRIX), n);
+       }
 
-       out[0]->vec[0] = RE_fresnel_dielectric(shi->view, n, shi->flippednor ? 1/eta : eta);
+       out[0]->vec[0] = RE_fresnel_dielectric(shi->view, n, shi->flippednor ? 1 / eta : eta);
 }
 
 /* node type definition */
index 90e2625b9612db64c7c3e542a5e41aba3947512d..a0b2408a7bb7fe879c827c20e30491c121d1ed81 100644 (file)
@@ -69,7 +69,7 @@ static void node_shader_exec_layer_weight(void *data, int UNUSED(thread), bNode
        if (shi->use_world_space_shading)
                mul_mat3_m4_v3((float (*)[4])RE_render_current_get_matrix(RE_VIEW_MATRIX), n);
 
-       out[0]->vec[0] = RE_fresnel_dielectric(shi->view, n, shi->flippednor ? eta : 1/eta);
+       out[0]->vec[0] = RE_fresnel_dielectric(shi->view, n, shi->flippednor ? eta : 1 / eta);
 
        float facing = fabs(dot_v3v3(shi->view, n));
        if (blend != 0.5) {
index 0be47c4f751a2acfd8a67347f821483a1b97ad65..1dfebc45d602a92062e16e8a8729b15bd4b308c1 100644 (file)
@@ -64,7 +64,7 @@ static void node_shader_init_tex_brick(bNodeTree *UNUSED(ntree), bNode *node)
 
        for (bNodeSocket *sock = node->inputs.first; sock; sock = sock->next) {
                if (STREQ(sock->name, "Mortar Smooth")) {
-                       ((bNodeSocketValueFloat*)sock->default_value)->value = 0.1f;
+                       ((bNodeSocketValueFloat *)sock->default_value)->value = 0.1f;
                }
        }
 }