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>2012-03-24 10:38:07 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-03-24 10:38:07 +0400
commitab4a2aaf4a4b2b4e416aa1f113b30362cbe0dec3 (patch)
tree81af4c18519181490074508dbe9a8d515eab634f /source/blender/editors/space_outliner/space_outliner.c
parent5a90ea77bc1333efe4e1e54984a080550ed3f707 (diff)
style cleanup: follow style guide for formatting of if/for/while loops, and else if's
Diffstat (limited to 'source/blender/editors/space_outliner/space_outliner.c')
-rw-r--r--source/blender/editors/space_outliner/space_outliner.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/source/blender/editors/space_outliner/space_outliner.c b/source/blender/editors/space_outliner/space_outliner.c
index d55fe40653e..ed050b7f93d 100644
--- a/source/blender/editors/space_outliner/space_outliner.c
+++ b/source/blender/editors/space_outliner/space_outliner.c
@@ -83,15 +83,15 @@ static int outliner_parent_drop_poll(bContext *C, wmDrag *drag, wmEvent *event)
float fmval[2];
UI_view2d_region_to_view(&ar->v2d, event->mval[0], event->mval[1], &fmval[0], &fmval[1]);
- if(drag->type == WM_DRAG_ID) {
+ if (drag->type == WM_DRAG_ID) {
ID *id = (ID *)drag->poin;
- if( GS(id->name) == ID_OB ) {
+ if ( GS(id->name) == ID_OB ) {
/* Ensure item under cursor is valid drop target */
/* Find object hovered over */
- for(te= soops->tree.first; te; te= te->next) {
+ for (te= soops->tree.first; te; te= te->next) {
TreeElement *te_valid;
te_valid= outliner_dropzone_parent(C, event, te, fmval);
- if(te_valid) return 1;
+ if (te_valid) return 1;
}
}
}
@@ -114,20 +114,20 @@ static int outliner_parent_clear_poll(bContext *C, wmDrag *drag, wmEvent *event)
UI_view2d_region_to_view(&ar->v2d, event->mval[0], event->mval[1], &fmval[0], &fmval[1]);
- if(drag->type == WM_DRAG_ID) {
+ if (drag->type == WM_DRAG_ID) {
ID *id = (ID *)drag->poin;
- if( GS(id->name) == ID_OB ) {
+ if ( GS(id->name) == ID_OB ) {
//TODO: Check if no parent?
/* Ensure location under cursor is valid dropzone */
- for(te= soops->tree.first; te; te= te->next) {
- if(outliner_dropzone_parent_clear(C, event, te, fmval)) return 1;
+ for (te= soops->tree.first; te; te= te->next) {
+ if (outliner_dropzone_parent_clear(C, event, te, fmval)) return 1;
}
/* Check if mouse cursor is below the tree */
te= soops->tree.last;
- while(((te->flag & TE_LAZY_CLOSED)==0) && (te->subtree.last)) {
+ while (((te->flag & TE_LAZY_CLOSED)==0) && (te->subtree.last)) {
te= te->subtree.last;
}
- if(fmval[1] < te->ys) return 1;
+ if (fmval[1] < te->ys) return 1;
}
}
return 0;
@@ -232,15 +232,15 @@ static void outliner_main_area_listener(ARegion *ar, wmNotifier *wmn)
break;
case NC_LAMP:
/* For updating lamp icons, when changing lamp type */
- if(wmn->data == ND_LIGHTING_DRAW)
+ if (wmn->data == ND_LIGHTING_DRAW)
ED_region_tag_redraw(ar);
break;
case NC_SPACE:
- if(wmn->data == ND_SPACE_OUTLINER)
+ if (wmn->data == ND_SPACE_OUTLINER)
ED_region_tag_redraw(ar);
break;
case NC_ID:
- if(wmn->action == NA_RENAME)
+ if (wmn->action == NA_RENAME)
ED_region_tag_redraw(ar);
break;
case NC_MATERIAL:
@@ -269,7 +269,7 @@ static void outliner_main_area_listener(ARegion *ar, wmNotifier *wmn)
ED_region_tag_redraw(ar);
break;
case ND_ANIMCHAN:
- if(wmn->action==NA_SELECTED)
+ if (wmn->action==NA_SELECTED)
ED_region_tag_redraw(ar);
break;
}
@@ -301,11 +301,11 @@ static void outliner_header_area_listener(ARegion *ar, wmNotifier *wmn)
/* context changes */
switch(wmn->category) {
case NC_SCENE:
- if(wmn->data == ND_KEYINGSET)
+ if (wmn->data == ND_KEYINGSET)
ED_region_tag_redraw(ar);
break;
case NC_SPACE:
- if(wmn->data == ND_SPACE_OUTLINER)
+ if (wmn->data == ND_SPACE_OUTLINER)
ED_region_tag_redraw(ar);
break;
}
@@ -349,8 +349,8 @@ static void outliner_free(SpaceLink *sl)
SpaceOops *soutliner= (SpaceOops*)sl;
outliner_free_tree(&soutliner->tree);
- if(soutliner->treestore) {
- if(soutliner->treestore->data) MEM_freeN(soutliner->treestore->data);
+ if (soutliner->treestore) {
+ if (soutliner->treestore->data) MEM_freeN(soutliner->treestore->data);
MEM_freeN(soutliner->treestore);
}