style cleanup: follow style guide for formatting of if/for/while loops, and else if's

This commit is contained in:
2012-03-24 06:38:07 +00:00
parent 5a90ea77bc
commit ab4a2aaf4a
367 changed files with 22225 additions and 21483 deletions

View File

@@ -67,7 +67,7 @@ static int ptcache_bake_all_poll(bContext *C)
{
Scene *scene= CTX_data_scene(C);
if(!scene)
if (!scene)
return 0;
return 1;
@@ -114,7 +114,8 @@ static int ptcache_bake_all_exec(bContext *C, wmOperator *op)
baker.progressbar = (void (*)(void *, int))WM_timecursor;
baker.progressend = (void (*)(void *))WM_cursor_restore;
baker.progresscontext = win;
} else {
}
else {
baker.progressbar = bake_console_progress;
baker.progressend = bake_console_progress_end;
baker.progresscontext = NULL;
@@ -134,10 +135,10 @@ static int ptcache_free_bake_all_exec(bContext *C, wmOperator *UNUSED(op))
PTCacheID *pid;
ListBase pidlist;
for(base=scene->base.first; base; base= base->next) {
for (base=scene->base.first; base; base= base->next) {
BKE_ptcache_ids_from_object(&pidlist, base->object, scene, MAX_DUPLI_RECUR);
for(pid=pidlist.first; pid; pid=pid->next) {
for (pid=pidlist.first; pid; pid=pid->next) {
pid->cache->flag &= ~PTCACHE_BAKED;
}
@@ -194,8 +195,8 @@ static int ptcache_bake_exec(bContext *C, wmOperator *op)
BKE_ptcache_ids_from_object(&pidlist, ob, scene, MAX_DUPLI_RECUR);
for(pid=pidlist.first; pid; pid=pid->next) {
if(pid->cache == cache)
for (pid=pidlist.first; pid; pid=pid->next) {
if (pid->cache == cache)
break;
}
@@ -216,7 +217,8 @@ static int ptcache_bake_exec(bContext *C, wmOperator *op)
baker.progressbar = (void (*)(void *, int))WM_timecursor;
baker.progressend = (void (*)(void *))WM_cursor_restore;
baker.progresscontext = win;
} else {
}
else {
printf("\n"); /* empty first line before console reports */
baker.progressbar = bake_console_progress;
baker.progressend = bake_console_progress_end;
@@ -238,8 +240,8 @@ static int ptcache_free_bake_exec(bContext *C, wmOperator *UNUSED(op))
PointCache *cache= ptr.data;
Object *ob= ptr.id.data;
if(cache->edit) {
if(!cache->edit->edited || 1) {// XXX okee("Lose changes done in particle mode?")) {
if (cache->edit) {
if (!cache->edit->edited || 1) {// XXX okee("Lose changes done in particle mode?")) {
PE_free_ptcache_edit(cache->edit);
cache->edit = NULL;
cache->flag &= ~PTCACHE_BAKED;
@@ -320,8 +322,8 @@ static int ptcache_add_new_exec(bContext *C, wmOperator *UNUSED(op))
BKE_ptcache_ids_from_object(&pidlist, ob, scene, MAX_DUPLI_RECUR);
for(pid=pidlist.first; pid; pid=pid->next) {
if(pid->cache == cache) {
for (pid=pidlist.first; pid; pid=pid->next) {
if (pid->cache == cache) {
PointCache *cache = BKE_ptcache_add(pid->ptcaches);
cache->step = pid->default_step;
*(pid->cache_ptr) = cache;
@@ -347,9 +349,9 @@ static int ptcache_remove_exec(bContext *C, wmOperator *UNUSED(op))
BKE_ptcache_ids_from_object(&pidlist, ob, scene, MAX_DUPLI_RECUR);
for(pid=pidlist.first; pid; pid=pid->next) {
if(pid->cache == cache) {
if(pid->ptcaches->first == pid->ptcaches->last)
for (pid=pidlist.first; pid; pid=pid->next) {
if (pid->cache == cache) {
if (pid->ptcaches->first == pid->ptcaches->last)
continue; /* don't delete last cache */
BLI_remlink(pid->ptcaches, pid->cache);