Cleanup: style
authorCampbell Barton <ideasman42@gmail.com>
Sun, 26 Aug 2018 10:34:33 +0000 (20:34 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 26 Aug 2018 10:34:33 +0000 (20:34 +1000)
13 files changed:
source/blender/blenkernel/intern/rigidbody.c
source/blender/blenkernel/intern/seqeffects.c
source/blender/compositor/operations/COM_CryptomatteOperation.cpp
source/blender/depsgraph/intern/builder/deg_builder_cycle.cc
source/blender/depsgraph/intern/builder/deg_builder_map.cc
source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
source/blender/depsgraph/intern/builder/deg_builder_nodes.h
source/blender/depsgraph/intern/depsgraph_build.cc
source/blender/imbuf/intern/jp2.c
source/blender/makesrna/intern/rna_nodetree.c
source/blender/modifiers/intern/MOD_cloth.c
source/blender/modifiers/intern/MOD_particleinstance.c
source/blender/modifiers/intern/MOD_smoke.c

index 5d6695e6598dcae5dbc835c4a20ec738fbd6286d..bfc6179493595f7ee5dab1881f1dd0228917a094 100644 (file)
@@ -701,9 +701,9 @@ static void rigidbody_validate_sim_object(RigidBodyWorld *rbw, Object *ob, bool
 /* --------------------- */
 
 static void rigidbody_constraint_init_spring(
-       RigidBodyCon *rbc, void (*set_spring)(rbConstraint*,int,int),
-       void (*set_stiffness)(rbConstraint*,int,float), void (*set_damping)(rbConstraint*,int,float)
-{
+        RigidBodyCon *rbc, void (*set_spring)(rbConstraint *, int, int),
+        void (*set_stiffness)(rbConstraint *, int, float), void (*set_damping)(rbConstraint *, int, float))
+{
        set_spring(rbc->physics_constraint, RB_LIMIT_LIN_X, rbc->flag & RBC_FLAG_USE_SPRING_X);
        set_stiffness(rbc->physics_constraint, RB_LIMIT_LIN_X, rbc->spring_stiffness_x);
        set_damping(rbc->physics_constraint, RB_LIMIT_LIN_X, rbc->spring_damping_x);
@@ -729,7 +729,7 @@ static void rigidbody_constraint_init_spring(
        set_damping(rbc->physics_constraint, RB_LIMIT_ANG_Z, rbc->spring_damping_ang_z);
 }
 
-static void rigidbody_constraint_set_limits(RigidBodyCon *rbc, void (*set_limits)(rbConstraint*,int,float,float))
+static void rigidbody_constraint_set_limits(RigidBodyCon *rbc, void (*set_limits)(rbConstraint *, int, float, float))
 {
        if (rbc->flag & RBC_FLAG_USE_LIMIT_LIN_X)
                set_limits(rbc->physics_constraint, RB_LIMIT_LIN_X, rbc->limit_lin_x_lower, rbc->limit_lin_x_upper);
index 64c59bd7f2b09e3e75454f6a2d889cf18e8664d6..e3fc494584cb1543f6f26225a66344e9ad6c89b3 100644 (file)
@@ -1772,8 +1772,9 @@ static float check_zone(WipeZone *wipezone, int x, int y, Sequence *seq, float f
                        /* BOX WIPE IS NOT WORKING YET */
 #if 0
                case DO_BOX_WIPE:
-      if (!wipe->forward)
-        facf0 = 1.0f - facf0;  /* Go the other direction */
+                       if (!wipe->forward) {
+                               facf0 = 1.0f - facf0;  /* Go the other direction */
+                       }
 
                        width = (int)(wipe->edgeWidth * ((xo + yo) / 2.0));
                        hwidth = (float)width / 2.0;
@@ -1806,8 +1807,9 @@ static float check_zone(WipeZone *wipezone, int x, int y, Sequence *seq, float f
                                        output = in_band(hwidth, hyp2, 1, 1) * in_band(hwidth, hyp, 1, 1);
                        }
 
-      if (!wipe->forward)
-        facf0 = 1.0f - facf0;  /* Go the other direction */
+                       if (!wipe->forward) {
+                               facf0 = 1.0f - facf0;  /* Go the other direction */
+                       }
                        angle = -1 / angle;
                        b1 = posy / 2 - (-angle) * posx / 2;
                        b3 = (yo - posy / 2) - (-angle) * (xo - posx / 2);
index f3fa81075c61ade7a85b3d5055ce3d6ec6476dc1..9a1cbdd7a00a1b30d94b01952260be1628a83479 100644 (file)
@@ -22,7 +22,7 @@
 
 CryptomatteOperation::CryptomatteOperation(size_t num_inputs) : NodeOperation()
 {
-       for(size_t i = 0; i < num_inputs; i++) {
+       for (size_t i = 0; i < num_inputs; i++) {
                this->addInputSocket(COM_DT_COLOR);
        }
        inputs.resize(num_inputs);
index 026aa309b02f3947ed25c7704655d7cc38382dec..feaba1a4aa8fa4ee25fe16a1cfeb77fc03129ac7 100644 (file)
@@ -68,7 +68,9 @@ struct CyclesSolverState {
                : graph(graph),
                  traversal_stack(BLI_stack_new(sizeof(StackEntry),
                                                "DEG detect cycles stack")),
-                 num_cycles(0) {
+                 num_cycles(0)
+       {
+               /* pass */
        }
        ~CyclesSolverState() {
                BLI_stack_free(traversal_stack);
index 218483d1dc53a50aaa726331de46f21309c343d3..bf29156c3fefbd5b450b6dafdbbdc7c327b73238 100644 (file)
@@ -54,7 +54,8 @@ void BuilderMap::tagBuild(ID *id) {
        BLI_gset_insert(set, id);
 }
 
-bool BuilderMap::checkIsBuiltAndTag(ID *id) {
+bool BuilderMap::checkIsBuiltAndTag(ID *id)
+{
        void **key_p;
        if (!BLI_gset_ensure_p_ex(set, id, &key_p)) {
                *key_p = id;
index b0894101414051e80ed7604c3f91d47850418054..953c8db0b3be0d3eba3dff3a87a8a8a80ef231df 100644 (file)
@@ -264,7 +264,8 @@ OperationDepsNode *DepsgraphNodeBuilder::find_operation_node(
 void DepsgraphNodeBuilder::begin_build() {
 }
 
-void DepsgraphNodeBuilder::build_id(ID* id) {
+void DepsgraphNodeBuilder::build_id(ID *id)
+{
        if (id == NULL) {
                return;
        }
index f2154e58703a0483f59a662de455ef01acd39907..5ecfbf2f6926a2d99c4184ecc41266aa16e0869a 100644 (file)
@@ -126,7 +126,7 @@ struct DepsgraphNodeBuilder {
                                               const char *name = "",
                                               int name_tag = -1);
 
-       void build_id(IDid);
+       void build_id(ID *id);
        void build_scene(Scene *scene);
        void build_group(Base *base, Group *group);
        void build_object(Base *base, Object *object);
index 1b270e71d64bc029b017382c3dadfca51dbc1d1f..d3c34cc63a9b0503cb1f0ea2012b8a3eb45c2f6b 100644 (file)
@@ -287,7 +287,7 @@ void DEG_scene_relations_update(Main *bmain, Scene *scene)
        BLI_gset_clear(graph->entry_tags, NULL);
 
        /* Build new nodes and relations. */
-       DEG_graph_build_from_scene(reinterpret_cast< ::Depsgraph * >(graph),
+       DEG_graph_build_from_scene(reinterpret_cast< ::Depsgraph *>(graph),
                                   bmain,
                                   scene);
 
@@ -349,7 +349,7 @@ void DEG_add_forcefield_relations(DepsNodeHandle *handle,
        if (effectors == NULL) {
                return;
        }
-       for (EffectorCache *eff = (EffectorCache*)effectors->first; eff; eff = eff->next) {
+       for (EffectorCache *eff = (EffectorCache *)effectors->first; eff; eff = eff->next) {
                if (eff->ob != object && eff->pd->forcefield != skip_forcefield) {
                        DEG_add_object_relation(handle, eff->ob, DEG_OB_COMP_TRANSFORM, name);
                        if (eff->psys) {
index e4923e94635a2c7a17c8beae1d3f95783772c556..cd6bdd643d558b2c7ba4b8a538682b8b69745213 100644 (file)
@@ -221,7 +221,7 @@ static opj_stream_t *opj_stream_create_from_buffer(
        if (l_stream == NULL) {
                return NULL;
        }
-       opj_stream_set_user_data(l_stream, p_file , opj_read_from_buffer_free);
+       opj_stream_set_user_data(l_stream, p_file, opj_read_from_buffer_free);
        opj_stream_set_user_data_length(l_stream, p_file->len);
        opj_stream_set_read_function(l_stream,  opj_read_from_buffer);
 #if 0  /* UNUSED */
index b41e9b1c4e57fef97f7460c73f6b891b94162f51..847de75c604b08b31207bcc363c5f9fab2202c1c 100644 (file)
@@ -7049,7 +7049,7 @@ static void def_cmp_cryptomatte(StructRNA *srna)
        RNA_def_struct_sdna_from(srna, "NodeCryptomatte", "storage");
        prop = RNA_def_property(srna, "matte_id", PROP_STRING, PROP_NONE);
        RNA_def_property_string_funcs(prop, "rna_NodeCryptomatte_matte_get", "rna_NodeCryptomatte_matte_length",
-                                                                 "rna_NodeCryptomatte_matte_set");
+                                     "rna_NodeCryptomatte_matte_set");
        RNA_def_property_ui_text(prop, "Matte Objects", "List of object and material crypto IDs to include in matte");
        RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
 
index 0317e0a92e40a94e233827631c79b0d693d6c8f7..ef41c5a270c8e603f465ff28c991655fc508545e 100644 (file)
@@ -125,7 +125,7 @@ static void updateDepgraph(ModifierData *md, const ModifierUpdateDepsgraphContex
        if (clmd) {
                /* Actual code uses get_collisionobjects */
 #ifdef WITH_LEGACY_DEPSGRAPH
-               dag_add_collision_relations(ctx->forest, ctx->scene, ctx->object, ctx->obNode, clmd->coll_parms->group, ctx->object->lay|ctx->scene->lay, eModifierType_Collision, NULL, true, "Cloth Collision");
+               dag_add_collision_relations(ctx->forest, ctx->scene, ctx->object, ctx->obNode, clmd->coll_parms->group, ctx->object->lay | ctx->scene->lay, eModifierType_Collision, NULL, true, "Cloth Collision");
                dag_add_forcefield_relations(ctx->forest, ctx->scene, ctx->object, ctx->obNode, clmd->sim_parms->effector_weights, true, 0, "Cloth Field");
 #else
        (void)ctx;
@@ -138,7 +138,7 @@ static void updateDepsgraph(ModifierData *md, const ModifierUpdateDepsgraphConte
        ClothModifierData *clmd = (ClothModifierData *)md;
        if (clmd != NULL) {
                /* Actual code uses get_collisionobjects */
-               DEG_add_collision_relations(ctx->node, ctx->scene, ctx->object, clmd->coll_parms->group, ctx->object->lay|ctx->scene->lay, eModifierType_Collision, NULL, true, "Cloth Collision");
+               DEG_add_collision_relations(ctx->node, ctx->scene, ctx->object, clmd->coll_parms->group, ctx->object->lay | ctx->scene->lay, eModifierType_Collision, NULL, true, "Cloth Collision");
 
                DEG_add_forcefield_relations(ctx->node, ctx->scene, ctx->object, clmd->sim_parms->effector_weights, true, 0, "Cloth Field");
        }
index 267ef362d03376668998ea8e7e0cd7592b9d60fc..d88526e2845441b6a6d0243927fc6cf0fb726ad1 100644 (file)
@@ -163,7 +163,7 @@ static bool particle_skip(ParticleInstanceModifierData *pimd, ParticleSystem *ps
 
        if (p >= psys->totpart) {
                ChildParticle *cpa = psys->child + (p - psys->totpart);
-               pa = psys->particles + (between? cpa->pa[0]: cpa->parent);
+               pa = psys->particles + (between ? cpa->pa[0] : cpa->parent);
        }
        else {
                pa = psys->particles + p;
@@ -187,8 +187,8 @@ static bool particle_skip(ParticleInstanceModifierData *pimd, ParticleSystem *ps
        /* TODO make randomization optional? */
        randp = (int)(psys_frand(psys, 3578 + p) * totpart) % totpart;
 
-       minp = (int)(totpart * pimd->particle_offset) % (totpart+1);
-       maxp = (int)(totpart * (pimd->particle_offset + pimd->particle_amount)) % (totpart+1);
+       minp = (int)(totpart * pimd->particle_offset) % (totpart + 1);
+       maxp = (int)(totpart * (pimd->particle_offset + pimd->particle_amount)) % (totpart + 1);
 
        if (maxp > minp) {
                return randp < minp || randp >= maxp;
@@ -354,7 +354,7 @@ static DerivedMesh *applyModifier(
        for (p = part_start, p_skip = 0; p < part_end; p++) {
                float prev_dir[3];
                float frame[4]; /* frame orientation quaternion */
-               float p_random = psys_frand(psys, 77091 + 283*p);
+               float p_random = psys_frand(psys, 77091 + 283 * p);
 
                /* skip particle? */
                if (particle_skip(pimd, psys, p))
@@ -418,7 +418,7 @@ static DerivedMesh *applyModifier(
                                                pa = psys->particles + p;
                                        else {
                                                ChildParticle *cpa = psys->child + (p - psys->totpart);
-                                               pa = psys->particles + (between? cpa->pa[0]: cpa->parent);
+                                               pa = psys->particles + (between ? cpa->pa[0] : cpa->parent);
                                        }
                                        psys_mat_hair_to_global(sim.ob, sim.psmd->dm_final, sim.psys->part->from, pa, hairmat);
                                        copy_m3_m4(mat, hairmat);
@@ -426,7 +426,7 @@ static DerivedMesh *applyModifier(
                                        mat3_to_quat(frame, mat);
 
                                        if (pimd->rotation > 0.0f || pimd->random_rotation > 0.0f) {
-                                               float angle = 2.0f*M_PI * (pimd->rotation + pimd->random_rotation * (psys_frand(psys, 19957323 + p) - 0.5f));
+                                               float angle = 2.0f * M_PI * (pimd->rotation + pimd->random_rotation * (psys_frand(psys, 19957323 + p) - 0.5f));
                                                float eul[3] = { 0.0f, 0.0f, angle };
                                                float rot[4];
 
index cd2a542efa913247ef4950a72467dca2563aa747..5f6d5ba58b56435e28f58c320fd82a7ee7d282a1 100644 (file)
@@ -138,8 +138,8 @@ static void updateDepgraph(ModifierData *md, const ModifierUpdateDepsgraphContex
        if (smd && (smd->type & MOD_SMOKE_TYPE_DOMAIN) && smd->domain) {
                /* Actual code uses get_collisionobjects */
 #ifdef WITH_LEGACY_DEPSGRAPH
-               dag_add_collision_relations(ctx->forest, ctx->scene, ctx->object, ctx->obNode, smd->domain->fluid_group, ctx->object->lay|ctx->scene->lay, eModifierType_Smoke, is_flow_cb, true, "Smoke Flow");
-               dag_add_collision_relations(ctx->forest, ctx->scene, ctx->object, ctx->obNode, smd->domain->coll_group, ctx->object->lay|ctx->scene->lay, eModifierType_Smoke, is_coll_cb, true, "Smoke Coll");
+               dag_add_collision_relations(ctx->forest, ctx->scene, ctx->object, ctx->obNode, smd->domain->fluid_group, ctx->object->lay | ctx->scene->lay, eModifierType_Smoke, is_flow_cb, true, "Smoke Flow");
+               dag_add_collision_relations(ctx->forest, ctx->scene, ctx->object, ctx->obNode, smd->domain->coll_group, ctx->object->lay | ctx->scene->lay, eModifierType_Smoke, is_coll_cb, true, "Smoke Coll");
                dag_add_forcefield_relations(ctx->forest, ctx->scene, ctx->object, ctx->obNode, smd->domain->effector_weights, true, PFIELD_SMOKEFLOW, "Smoke Force Field");
 #else
        (void)ctx;
@@ -153,8 +153,8 @@ static void updateDepsgraph(ModifierData *md, const ModifierUpdateDepsgraphConte
 
        if (smd && (smd->type & MOD_SMOKE_TYPE_DOMAIN) && smd->domain) {
                /* Actual code uses get_collisionobjects */
-               DEG_add_collision_relations(ctx->node, ctx->scene, ctx->object, smd->domain->fluid_group, ctx->object->lay|ctx->scene->lay, eModifierType_Smoke, is_flow_cb, true, "Smoke Flow");
-               DEG_add_collision_relations(ctx->node, ctx->scene, ctx->object, smd->domain->coll_group, ctx->object->lay|ctx->scene->lay, eModifierType_Smoke, is_coll_cb, true, "Smoke Coll");
+               DEG_add_collision_relations(ctx->node, ctx->scene, ctx->object, smd->domain->fluid_group, ctx->object->lay | ctx->scene->lay, eModifierType_Smoke, is_flow_cb, true, "Smoke Flow");
+               DEG_add_collision_relations(ctx->node, ctx->scene, ctx->object, smd->domain->coll_group, ctx->object->lay | ctx->scene->lay, eModifierType_Smoke, is_coll_cb, true, "Smoke Coll");
 
                DEG_add_forcefield_relations(ctx->node, ctx->scene, ctx->object, smd->domain->effector_weights, true, PFIELD_SMOKEFLOW, "Smoke Force Field");
        }