diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-08-26 13:34:33 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-08-26 13:34:33 +0300 |
commit | 3ee0ce27faea8da816b07d7ef9ce31f97d517ca3 (patch) | |
tree | 74b63c8ec53f42e0e0e66fbe3a043b0bb10ebc4e /source/blender/modifiers | |
parent | 03fd1da3ee860e24dfdfd454e7ea8b1bcf9ff5c1 (diff) |
Cleanup: style
Diffstat (limited to 'source/blender/modifiers')
-rw-r--r-- | source/blender/modifiers/intern/MOD_cloth.c | 4 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_particleinstance.c | 12 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_smoke.c | 8 |
3 files changed, 12 insertions, 12 deletions
diff --git a/source/blender/modifiers/intern/MOD_cloth.c b/source/blender/modifiers/intern/MOD_cloth.c index 0317e0a92e4..ef41c5a270c 100644 --- a/source/blender/modifiers/intern/MOD_cloth.c +++ b/source/blender/modifiers/intern/MOD_cloth.c @@ -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"); } diff --git a/source/blender/modifiers/intern/MOD_particleinstance.c b/source/blender/modifiers/intern/MOD_particleinstance.c index 267ef362d03..d88526e2845 100644 --- a/source/blender/modifiers/intern/MOD_particleinstance.c +++ b/source/blender/modifiers/intern/MOD_particleinstance.c @@ -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]; diff --git a/source/blender/modifiers/intern/MOD_smoke.c b/source/blender/modifiers/intern/MOD_smoke.c index cd2a542efa9..5f6d5ba58b5 100644 --- a/source/blender/modifiers/intern/MOD_smoke.c +++ b/source/blender/modifiers/intern/MOD_smoke.c @@ -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"); } |