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:
Diffstat (limited to 'source/blender/editors/physics/particle_boids.c')
-rw-r--r--source/blender/editors/physics/particle_boids.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/source/blender/editors/physics/particle_boids.c b/source/blender/editors/physics/particle_boids.c
index ff3c4605eee..57b22991f94 100644
--- a/source/blender/editors/physics/particle_boids.c
+++ b/source/blender/editors/physics/particle_boids.c
@@ -78,7 +78,7 @@ static int rule_add_exec(bContext *C, wmOperator *op)
BLI_addtail(&state->rules, rule);
DEG_id_tag_update(&part->id, OB_RECALC_DATA|PSYS_RECALC_RESET);
-
+
return OPERATOR_FINISHED;
}
@@ -88,14 +88,14 @@ void BOID_OT_rule_add(wmOperatorType *ot)
ot->name = "Add Boid Rule";
ot->description = "Add a boid rule to the current boid state";
ot->idname = "BOID_OT_rule_add";
-
+
/* api callbacks */
ot->invoke = WM_menu_invoke;
ot->exec = rule_add_exec;
-
+
/* flags */
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
-
+
ot->prop = RNA_def_enum(ot->srna, "type", rna_enum_boidrule_type_items, 0, "Type", "");
}
static int rule_del_exec(bContext *C, wmOperator *UNUSED(op))
@@ -135,7 +135,7 @@ void BOID_OT_rule_del(wmOperatorType *ot)
ot->name = "Remove Boid Rule";
ot->idname = "BOID_OT_rule_del";
ot->description = "Delete current boid rule";
-
+
/* api callbacks */
ot->exec = rule_del_exec;
@@ -153,7 +153,7 @@ static int rule_move_up_exec(bContext *C, wmOperator *UNUSED(op))
if (!part || part->phystype != PART_PHYS_BOIDS)
return OPERATOR_CANCELLED;
-
+
state = boid_get_current_state(part->boids);
for (rule = state->rules.first; rule; rule=rule->next) {
if (rule->flag & BOIDRULE_CURRENT && rule->prev) {
@@ -164,7 +164,7 @@ static int rule_move_up_exec(bContext *C, wmOperator *UNUSED(op))
break;
}
}
-
+
return OPERATOR_FINISHED;
}
@@ -175,7 +175,7 @@ void BOID_OT_rule_move_up(wmOperatorType *ot)
ot->idname = "BOID_OT_rule_move_up";
ot->exec = rule_move_up_exec;
-
+
/* flags */
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
@@ -189,7 +189,7 @@ static int rule_move_down_exec(bContext *C, wmOperator *UNUSED(op))
if (!part || part->phystype != PART_PHYS_BOIDS)
return OPERATOR_CANCELLED;
-
+
state = boid_get_current_state(part->boids);
for (rule = state->rules.first; rule; rule=rule->next) {
if (rule->flag & BOIDRULE_CURRENT && rule->next) {
@@ -200,7 +200,7 @@ static int rule_move_down_exec(bContext *C, wmOperator *UNUSED(op))
break;
}
}
-
+
return OPERATOR_FINISHED;
}
@@ -211,7 +211,7 @@ void BOID_OT_rule_move_down(wmOperatorType *ot)
ot->idname = "BOID_OT_rule_move_down";
ot->exec = rule_move_down_exec;
-
+
/* flags */
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
@@ -244,10 +244,10 @@ void BOID_OT_state_add(wmOperatorType *ot)
ot->name = "Add Boid State";
ot->description = "Add a boid state to the particle system";
ot->idname = "BOID_OT_state_add";
-
+
/* api callbacks */
ot->exec = state_add_exec;
-
+
/* flags */
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
@@ -281,7 +281,7 @@ static int state_del_exec(bContext *C, wmOperator *UNUSED(op))
DEG_relations_tag_update(bmain);
DEG_id_tag_update(&part->id, OB_RECALC_DATA|PSYS_RECALC_RESET);
-
+
return OPERATOR_FINISHED;
}
@@ -291,7 +291,7 @@ void BOID_OT_state_del(wmOperatorType *ot)
ot->name = "Remove Boid State";
ot->idname = "BOID_OT_state_del";
ot->description = "Delete current boid state";
-
+
/* api callbacks */
ot->exec = state_del_exec;
@@ -311,7 +311,7 @@ static int state_move_up_exec(bContext *C, wmOperator *UNUSED(op))
return OPERATOR_CANCELLED;
boids = part->boids;
-
+
for (state = boids->states.first; state; state=state->next) {
if (state->flag & BOIDSTATE_CURRENT && state->prev) {
BLI_remlink(&boids->states, state);
@@ -319,7 +319,7 @@ static int state_move_up_exec(bContext *C, wmOperator *UNUSED(op))
break;
}
}
-
+
return OPERATOR_FINISHED;
}
@@ -330,7 +330,7 @@ void BOID_OT_state_move_up(wmOperatorType *ot)
ot->idname = "BOID_OT_state_move_up";
ot->exec = state_move_up_exec;
-
+
/* flags */
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
@@ -346,7 +346,7 @@ static int state_move_down_exec(bContext *C, wmOperator *UNUSED(op))
return OPERATOR_CANCELLED;
boids = part->boids;
-
+
for (state = boids->states.first; state; state=state->next) {
if (state->flag & BOIDSTATE_CURRENT && state->next) {
BLI_remlink(&boids->states, state);
@@ -355,7 +355,7 @@ static int state_move_down_exec(bContext *C, wmOperator *UNUSED(op))
break;
}
}
-
+
return OPERATOR_FINISHED;
}
@@ -366,7 +366,7 @@ void BOID_OT_state_move_down(wmOperatorType *ot)
ot->idname = "BOID_OT_state_move_down";
ot->exec = state_move_down_exec;
-
+
/* flags */
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}