[Bf-blender-cvs] [98f4a8eedf2] master: Cleanup: style
Campbell Barton
noreply at git.blender.org
Tue Aug 14 01:57:29 CEST 2018
Commit: 98f4a8eedf218c240adbac586fed02cfe51e01a9
Author: Campbell Barton
Date: Tue Aug 14 10:00:15 2018 +1000
Branches: master
https://developer.blender.org/rB98f4a8eedf218c240adbac586fed02cfe51e01a9
Cleanup: style
===================================================================
M source/blender/editors/physics/particle_boids.c
M source/blender/editors/physics/particle_edit.c
M source/blender/editors/physics/particle_edit_undo.c
M source/blender/editors/physics/particle_edit_utildefines.h
M source/blender/editors/physics/particle_object.c
===================================================================
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;
}
diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c
index 73ed8b016ef..5699c1f59f8 100644
--- a/source/blender/editors/physics/particle_edit.c
+++ b/source/blender/editors/physics/particle_edit.c
@@ -89,8 +89,8 @@
bool PE_poll(bContext *C)
{
Main *bmain = CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
- Object *ob= CTX_data_active_object(C);
+ Scene *scene = CTX_data_scene(C);
+ Object *ob = CTX_data_active_object(C);
if (!scene || !ob || !(ob->mode & OB_MODE_PARTICLE_EDIT))
return 0;
@@ -101,14 +101,14 @@ bool PE_poll(bContext *C)
bool PE_hair_poll(bContext *C)
{
Main *bmain = CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
- Object *ob= CTX_data_active_object(C);
+ Scene *scene = CTX_data_scene(C);
+ Object *ob = CTX_data_active_object(C);
PTCacheEdit *edit;
if (!scene || !ob || !(ob->mode & OB_MODE_PARTICLE_EDIT))
return 0;
- edit= PE_get_current(bmain, scene, ob);
+ edit = PE_get_current(bmain, scene, ob);
return (edit && edit->psys);
}
@@ -127,7 +127,7 @@ void PE_free_ptcache_edit(PTCacheEdit *edit)
{
POINT_P;
- if (edit==0) return;
+ if (edit == 0) return;
if (edit->points) {
LOOP_POINTS {
@@ -143,12 +143,12 @@ void PE_free_ptcache_edit(PTCacheEdit *edit)
if (edit->emitter_cosnos) {
MEM_freeN(edit->emitter_cosnos);
- edit->emitter_cosnos= 0;
+ edit->emitter_cosnos = 0;
}
if (edit->emitter_field) {
BLI_kdtree_free(edit->emitter_field);
- edit->emitter_field= 0;
+ edit->emitter_field = 0;
}
psys_free_path_cache(edit->psys, edit);
@@ -193,12 +193,12 @@ static float pe_brush_size_get(const Scene *UNUSED(scene), ParticleBrushData *br
* keep it fast! */
static PTCacheEdit *pe_get_current(Main *bmain, Scene *scene, Object *ob, int create)
{
- ParticleEditSettings *pset= PE_settings(scene);
+ ParticleEditSettings *pset = PE_settings(scene);
PTCacheEdit *edit = NULL;
ListBase pidlist;
PTCacheID *pid;
- if (pset==NULL || ob==NULL)
+ if (pset == NULL || ob == NULL)
return NULL;
pset->scene = scene;
@@ -222,7 +222,7 @@ static PTCacheEdit *pe_get_current(Main *bmain, Scene *scene, Object *ob, int cr
}
}
- for (pid=pidlist.first; pid; pid=pid->next) {
+ for (pid = pidlist.first; pid; pid = pid->next) {
if (pset->edittype == PE_TYPE_PARTICLES && pid->type == PTCACHE_TYPE_PARTICLES) {
ParticleSystem *psys = pid->calldata;
@@ -294,11 +294,11 @@ void PE_current_changed(Main *bmain, Scene *scene, Object *ob)
void PE_hide_keys_time(Scene *scene, PTCacheEdit *edit, float cfra)
{
- ParticleEditSettings *pset=PE_settings(scene);
+ ParticleEditSettings *pset = PE_settings(scene);
POINT_P; KEY_K;
- if (pset->flag & PE_FADE_TIME && pset->selectmode==SCE_SELECT_POINT) {
+ if (pset->flag & PE_FADE_TIME && pset->selectmode == SCE_SELECT_POINT) {
LOOP_POINTS {
LOOP_KEYS {
if (fabsf(cfra - *key->time) < pset->fade_frames)
@@ -369,9 +369,9 @@ static void PE_set_data(bContext *C, PEData *data)
memset(data, 0, s
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list