Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-08-14 03:00:15 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-08-14 03:00:37 +0300
commit98f4a8eedf218c240adbac586fed02cfe51e01a9 (patch)
tree26c4ee53923906ba29d66a799045855888ecd558 /source/blender/editors/physics/particle_boids.c
parente24cd10245ec5754009db5417289b68d5d69ff14 (diff)
Cleanup: style
Diffstat (limited to 'source/blender/editors/physics/particle_boids.c')
-rw-r--r--source/blender/editors/physics/particle_boids.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/source/blender/editors/physics/particle_boids.c b/source/blender/editors/physics/particle_boids.c
index b6fc0fcad80..bb7dd64fb47 100644
--- a/source/blender/editors/physics/particle_boids.c
+++ b/source/blender/editors/physics/particle_boids.c
@@ -57,7 +57,7 @@ static int rule_add_exec(bContext *C, wmOperator *op)
{
PointerRNA ptr = CTX_data_pointer_get_type(C, "particle_settings", &RNA_ParticleSettings);
ParticleSettings *part = ptr.data;
- int type= RNA_enum_get(op->ptr, "type");
+ int type = RNA_enum_get(op->ptr, "type");
BoidRule *rule;
BoidState *state;
@@ -67,7 +67,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);
@@ -75,7 +75,7 @@ static int rule_add_exec(bContext *C, wmOperator *op)
BLI_addtail(&state->rules, rule);
- DAG_id_tag_update(&part->id, OB_RECALC_DATA|PSYS_RECALC_RESET);
+ DAG_id_tag_update(&part->id, OB_RECALC_DATA | PSYS_RECALC_RESET);
return OPERATOR_FINISHED;
}
@@ -92,7 +92,7 @@ void BOID_OT_rule_add(wmOperatorType *ot)
ot->exec = rule_add_exec;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
ot->prop = RNA_def_enum(ot->srna, "type", rna_enum_boidrule_type_items, 0, "Type", "");
}
@@ -109,7 +109,7 @@ static int rule_del_exec(bContext *C, wmOperator *UNUSED(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) {
if (rule->flag & BOIDRULE_CURRENT) {
BLI_remlink(&state->rules, rule);
MEM_freeN(rule);
@@ -122,7 +122,7 @@ static int rule_del_exec(bContext *C, wmOperator *UNUSED(op))
rule->flag |= BOIDRULE_CURRENT;
DAG_relations_tag_update(bmain);
- DAG_id_tag_update(&part->id, OB_RECALC_DATA|PSYS_RECALC_RESET);
+ DAG_id_tag_update(&part->id, OB_RECALC_DATA | PSYS_RECALC_RESET);
return OPERATOR_FINISHED;
}
@@ -138,7 +138,7 @@ void BOID_OT_rule_del(wmOperatorType *ot)
ot->exec = rule_del_exec;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/************************ move up/down boid rule operators *********************/
@@ -153,12 +153,12 @@ static int rule_move_up_exec(bContext *C, wmOperator *UNUSED(op))
return OPERATOR_CANCELLED;
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) {
if (rule->flag & BOIDRULE_CURRENT && rule->prev) {
BLI_remlink(&state->rules, rule);
BLI_insertlinkbefore(&state->rules, rule->prev, rule);
- DAG_id_tag_update(&part->id, OB_RECALC_DATA|PSYS_RECALC_RESET);
+ DAG_id_tag_update(&part->id, OB_RECALC_DATA | PSYS_RECALC_RESET);
break;
}
}
@@ -175,7 +175,7 @@ void BOID_OT_rule_move_up(wmOperatorType *ot)
ot->exec = rule_move_up_exec;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
static int rule_move_down_exec(bContext *C, wmOperator *UNUSED(op))
@@ -189,12 +189,12 @@ static int rule_move_down_exec(bContext *C, wmOperator *UNUSED(op))
return OPERATOR_CANCELLED;
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) {
if (rule->flag & BOIDRULE_CURRENT && rule->next) {
BLI_remlink(&state->rules, rule);
BLI_insertlinkafter(&state->rules, rule->next, rule);
- DAG_id_tag_update(&part->id, OB_RECALC_DATA|PSYS_RECALC_RESET);
+ DAG_id_tag_update(&part->id, OB_RECALC_DATA | PSYS_RECALC_RESET);
break;
}
}
@@ -211,7 +211,7 @@ void BOID_OT_rule_move_down(wmOperatorType *ot)
ot->exec = rule_move_down_exec;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
@@ -225,7 +225,7 @@ static int state_add_exec(bContext *C, wmOperator *UNUSED(op))
if (!part || part->phystype != PART_PHYS_BOIDS)
return OPERATOR_CANCELLED;
- 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);
@@ -247,7 +247,7 @@ void BOID_OT_state_add(wmOperatorType *ot)
ot->exec = state_add_exec;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
static int state_del_exec(bContext *C, wmOperator *UNUSED(op))
{
@@ -259,7 +259,7 @@ static int state_del_exec(bContext *C, wmOperator *UNUSED(op))
if (!part || part->phystype != PART_PHYS_BOIDS)
return OPERATOR_CANCELLED;
- for (state=part->boids->states.first; state; state=state->next) {
+ for (state = part->boids->states.first; state; state = state->next) {
if (state->flag & BOIDSTATE_CURRENT) {
BLI_remlink(&part->boids->states, state);
MEM_freeN(state);
@@ -278,7 +278,7 @@ static int state_del_exec(bContext *C, wmOperator *UNUSED(op))
state->flag |= BOIDSTATE_CURRENT;
DAG_relations_tag_update(bmain);
- DAG_id_tag_update(&part->id, OB_RECALC_DATA|PSYS_RECALC_RESET);
+ DAG_id_tag_update(&part->id, OB_RECALC_DATA | PSYS_RECALC_RESET);
return OPERATOR_FINISHED;
}
@@ -294,7 +294,7 @@ void BOID_OT_state_del(wmOperatorType *ot)
ot->exec = state_del_exec;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/************************ move up/down boid state operators *********************/
@@ -310,7 +310,7 @@ static int state_move_up_exec(bContext *C, wmOperator *UNUSED(op))
boids = part->boids;
- for (state = boids->states.first; state; state=state->next) {
+ for (state = boids->states.first; state; state = state->next) {
if (state->flag & BOIDSTATE_CURRENT && state->prev) {
BLI_remlink(&boids->states, state);
BLI_insertlinkbefore(&boids->states, state->prev, state);
@@ -330,7 +330,7 @@ void BOID_OT_state_move_up(wmOperatorType *ot)
ot->exec = state_move_up_exec;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
static int state_move_down_exec(bContext *C, wmOperator *UNUSED(op))
@@ -345,11 +345,11 @@ static int state_move_down_exec(bContext *C, wmOperator *UNUSED(op))
boids = part->boids;
- for (state = boids->states.first; state; state=state->next) {
+ for (state = boids->states.first; state; state = state->next) {
if (state->flag & BOIDSTATE_CURRENT && state->next) {
BLI_remlink(&boids->states, state);
BLI_insertlinkafter(&boids->states, state->next, state);
- DAG_id_tag_update(&part->id, OB_RECALC_DATA|PSYS_RECALC_RESET);
+ DAG_id_tag_update(&part->id, OB_RECALC_DATA | PSYS_RECALC_RESET);
break;
}
}
@@ -366,5 +366,5 @@ void BOID_OT_state_move_down(wmOperatorType *ot)
ot->exec = state_move_down_exec;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}