diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-03-24 10:38:07 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-03-24 10:38:07 +0400 |
commit | ab4a2aaf4a4b2b4e416aa1f113b30362cbe0dec3 (patch) | |
tree | 81af4c18519181490074508dbe9a8d515eab634f /source/blender/editors/physics/particle_boids.c | |
parent | 5a90ea77bc1333efe4e1e54984a080550ed3f707 (diff) |
style cleanup: follow style guide for formatting of if/for/while loops, and else if's
Diffstat (limited to 'source/blender/editors/physics/particle_boids.c')
-rw-r--r-- | source/blender/editors/physics/particle_boids.c | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/source/blender/editors/physics/particle_boids.c b/source/blender/editors/physics/particle_boids.c index 8440b7144a5..7a7c16b23ff 100644 --- a/source/blender/editors/physics/particle_boids.c +++ b/source/blender/editors/physics/particle_boids.c @@ -65,7 +65,7 @@ static int rule_add_exec(bContext *C, wmOperator *op) BoidRule *rule; BoidState *state; - if(!psys || !psys->part || psys->part->phystype != PART_PHYS_BOIDS) + if (!psys || !psys->part || psys->part->phystype != PART_PHYS_BOIDS) return OPERATOR_CANCELLED; part = psys->part; @@ -73,7 +73,7 @@ static int rule_add_exec(bContext *C, wmOperator *op) state = boid_get_current_state(part->boids); - for(rule=state->rules.first; rule; rule=rule->next) + for (rule=state->rules.first; rule; rule=rule->next) rule->flag &= ~BOIDRULE_CURRENT; rule = boid_new_rule(type); @@ -113,14 +113,14 @@ static int rule_del_exec(bContext *C, wmOperator *UNUSED(op)) BoidRule *rule; BoidState *state; - if(!psys || !psys->part || psys->part->phystype != PART_PHYS_BOIDS) + if (!psys || !psys->part || psys->part->phystype != PART_PHYS_BOIDS) return OPERATOR_CANCELLED; state = boid_get_current_state(psys->part->boids); - for(rule=state->rules.first; rule; rule=rule->next) { - if(rule->flag & BOIDRULE_CURRENT) { + for (rule=state->rules.first; rule; rule=rule->next) { + if (rule->flag & BOIDRULE_CURRENT) { BLI_remlink(&state->rules, rule); MEM_freeN(rule); break; @@ -129,7 +129,7 @@ static int rule_del_exec(bContext *C, wmOperator *UNUSED(op)) } rule = state->rules.first; - if(rule) + if (rule) rule->flag |= BOIDRULE_CURRENT; DAG_scene_sort(bmain, scene); @@ -162,12 +162,12 @@ static int rule_move_up_exec(bContext *C, wmOperator *UNUSED(op)) BoidRule *rule; BoidState *state; - if(!psys || !psys->part || psys->part->phystype != PART_PHYS_BOIDS) + if (!psys || !psys->part || psys->part->phystype != PART_PHYS_BOIDS) return OPERATOR_CANCELLED; state = boid_get_current_state(psys->part->boids); - for(rule = state->rules.first; rule; rule=rule->next) { - if(rule->flag & BOIDRULE_CURRENT && rule->prev) { + for (rule = state->rules.first; rule; rule=rule->next) { + if (rule->flag & BOIDRULE_CURRENT && rule->prev) { BLI_remlink(&state->rules, rule); BLI_insertlink(&state->rules, rule->prev->prev, rule); @@ -200,12 +200,12 @@ static int rule_move_down_exec(bContext *C, wmOperator *UNUSED(op)) BoidRule *rule; BoidState *state; - if(!psys || !psys->part || psys->part->phystype != PART_PHYS_BOIDS) + if (!psys || !psys->part || psys->part->phystype != PART_PHYS_BOIDS) return OPERATOR_CANCELLED; state = boid_get_current_state(psys->part->boids); - for(rule = state->rules.first; rule; rule=rule->next) { - if(rule->flag & BOIDRULE_CURRENT && rule->next) { + for (rule = state->rules.first; rule; rule=rule->next) { + if (rule->flag & BOIDRULE_CURRENT && rule->next) { BLI_remlink(&state->rules, rule); BLI_insertlink(&state->rules, rule->next, rule); @@ -240,12 +240,12 @@ static int state_add_exec(bContext *C, wmOperator *UNUSED(op)) ParticleSettings *part; BoidState *state; - if(!psys || !psys->part || psys->part->phystype != PART_PHYS_BOIDS) + if (!psys || !psys->part || psys->part->phystype != PART_PHYS_BOIDS) return OPERATOR_CANCELLED; part = psys->part; - for(state=part->boids->states.first; state; state=state->next) + for (state=part->boids->states.first; state; state=state->next) state->flag &= ~BOIDSTATE_CURRENT; state = boid_new_state(part->boids); @@ -281,13 +281,13 @@ static int state_del_exec(bContext *C, wmOperator *UNUSED(op)) ParticleSettings *part; BoidState *state; - if(!psys || !psys->part || psys->part->phystype != PART_PHYS_BOIDS) + if (!psys || !psys->part || psys->part->phystype != PART_PHYS_BOIDS) return OPERATOR_CANCELLED; part = psys->part; - for(state=part->boids->states.first; state; state=state->next) { - if(state->flag & BOIDSTATE_CURRENT) { + for (state=part->boids->states.first; state; state=state->next) { + if (state->flag & BOIDSTATE_CURRENT) { BLI_remlink(&part->boids->states, state); MEM_freeN(state); break; @@ -296,7 +296,7 @@ static int state_del_exec(bContext *C, wmOperator *UNUSED(op)) } /* there must be at least one state */ - if(!part->boids->states.first) { + if (!part->boids->states.first) { state = boid_new_state(part->boids); BLI_addtail(&part->boids->states, state); } @@ -335,13 +335,13 @@ static int state_move_up_exec(bContext *C, wmOperator *UNUSED(op)) BoidSettings *boids; BoidState *state; - if(!psys || !psys->part || psys->part->phystype != PART_PHYS_BOIDS) + if (!psys || !psys->part || psys->part->phystype != PART_PHYS_BOIDS) return OPERATOR_CANCELLED; boids = psys->part->boids; - for(state = boids->states.first; state; state=state->next) { - if(state->flag & BOIDSTATE_CURRENT && state->prev) { + for (state = boids->states.first; state; state=state->next) { + if (state->flag & BOIDSTATE_CURRENT && state->prev) { BLI_remlink(&boids->states, state); BLI_insertlink(&boids->states, state->prev->prev, state); WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob); @@ -371,13 +371,13 @@ static int state_move_down_exec(bContext *C, wmOperator *UNUSED(op)) BoidSettings *boids; BoidState *state; - if(!psys || !psys->part || psys->part->phystype != PART_PHYS_BOIDS) + if (!psys || !psys->part || psys->part->phystype != PART_PHYS_BOIDS) return OPERATOR_CANCELLED; boids = psys->part->boids; - for(state = boids->states.first; state; state=state->next) { - if(state->flag & BOIDSTATE_CURRENT && state->next) { + for (state = boids->states.first; state; state=state->next) { + if (state->flag & BOIDSTATE_CURRENT && state->next) { BLI_remlink(&boids->states, state); BLI_insertlink(&boids->states, state->next, state); DAG_id_tag_update(&psys->part->id, OB_RECALC_DATA|PSYS_RECALC_RESET); |