From b340f930ec5639f24e7e2d47fab221fb752b61dd Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 28 Apr 2012 06:31:57 +0000 Subject: style cleanup: changes to brace placement / newlines - for/while/if/switch --- source/blender/editors/space_outliner/outliner_draw.c | 16 ++++++++-------- source/blender/editors/space_outliner/outliner_select.c | 4 ++-- source/blender/editors/space_outliner/outliner_tools.c | 2 +- source/blender/editors/space_outliner/space_outliner.c | 16 ++++++++-------- 4 files changed, 19 insertions(+), 19 deletions(-) (limited to 'source/blender/editors/space_outliner') diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c index 779475943dd..7b2bbf3e285 100644 --- a/source/blender/editors/space_outliner/outliner_draw.c +++ b/source/blender/editors/space_outliner/outliner_draw.c @@ -278,7 +278,7 @@ static void namebutton_cb(bContext *C, void *tsep, char *oldname) if (tselem->type==0) { test_idbutton(tselem->id->name+2); // library.c, unique name and alpha sort - switch(GS(tselem->id->name)) { + switch (GS(tselem->id->name)) { case ID_MA: WM_event_add_notifier(C, NC_MATERIAL, NULL); break; case ID_TE: @@ -305,7 +305,7 @@ static void namebutton_cb(bContext *C, void *tsep, char *oldname) } } else { - switch(tselem->type) { + switch (tselem->type) { case TSE_DEFGROUP: defgroup_unique_name(te->directdata, (Object *)tselem->id); // id = object break; @@ -719,7 +719,7 @@ static void keymap_type_cb(bContext *C, void *kmi_v, void *UNUSED(arg_v)) short maptype= keymap_menu_type(kmi->type); if (maptype!=kmi->maptype) { - switch(kmi->maptype) { + switch (kmi->maptype) { case OL_KM_KEYBOARD: kmi->type= AKEY; kmi->val= KM_PRESS; @@ -776,7 +776,7 @@ static void outliner_draw_keymapbuts(uiBlock *block, ARegion *ar, SpaceOops *soo xstart+= butw2+5; /* edit actual event */ - switch(kmi->maptype) { + switch (kmi->maptype) { case OL_KM_KEYBOARD: uiDefKeyevtButS(block, 0, "", xstart, (int)te->ys+1, butw2, UI_UNIT_Y-1, &kmi->type, "Key code"); xstart+= butw2+5; @@ -904,7 +904,7 @@ static void tselem_draw_icon(uiBlock *block, int xmax, float x, float y, TreeSto arg.alpha= alpha; if (tselem->type) { - switch( tselem->type) { + switch ( tselem->type) { case TSE_ANIM_DATA: UI_icon_draw(x, y, ICON_ANIM_DATA); break; // xxx case TSE_NLA: @@ -932,7 +932,7 @@ static void tselem_draw_icon(uiBlock *block, int xmax, float x, float y, TreeSto { Object *ob= (Object *)tselem->id; ModifierData *md= BLI_findlink(&ob->modifiers, tselem->nr); - switch(md->type) { + switch (md->type) { case eModifierType_Subsurf: UI_icon_draw(x, y, ICON_MOD_SUBSURF); break; case eModifierType_Armature: @@ -1093,7 +1093,7 @@ static void tselem_draw_icon(uiBlock *block, int xmax, float x, float y, TreeSto } } else { - switch( GS(tselem->id->name)) { + switch ( GS(tselem->id->name)) { case ID_SCE: tselem_draw_icon_uibut(&arg, ICON_SCENE_DATA); break; case ID_ME: @@ -1108,7 +1108,7 @@ static void tselem_draw_icon(uiBlock *block, int xmax, float x, float y, TreeSto { Lamp *la= (Lamp *)tselem->id; - switch(la->type) { + switch (la->type) { case LA_LOCAL: tselem_draw_icon_uibut(&arg, ICON_LAMP_POINT); break; case LA_SUN: diff --git a/source/blender/editors/space_outliner/outliner_select.c b/source/blender/editors/space_outliner/outliner_select.c index c06576e48a6..5515ec45269 100644 --- a/source/blender/editors/space_outliner/outliner_select.c +++ b/source/blender/editors/space_outliner/outliner_select.c @@ -629,7 +629,7 @@ static int tree_element_active_keymap_item(bContext *UNUSED(C), TreeElement *te, int tree_element_active(bContext *C, Scene *scene, SpaceOops *soops, TreeElement *te, int set) { - switch(te->idcode) { + switch (te->idcode) { /* Note: no ID_OB: objects are handled specially to allow multiple * selection. See do_outliner_item_activate. */ case ID_MA: @@ -652,7 +652,7 @@ int tree_element_active(bContext *C, Scene *scene, SpaceOops *soops, TreeElement /* Context can be NULL when set==0 */ int tree_element_type_active(bContext *C, Scene *scene, SpaceOops *soops, TreeElement *te, TreeStoreElem *tselem, int set) { - switch(tselem->type) { + switch (tselem->type) { case TSE_DEFGROUP: return tree_element_active_defgroup(C, scene, te, tselem, set); case TSE_BONE: diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c index 5c527face83..13e86209f3a 100644 --- a/source/blender/editors/space_outliner/outliner_tools.c +++ b/source/blender/editors/space_outliner/outliner_tools.c @@ -96,7 +96,7 @@ static void set_operation_types(SpaceOops *soops, ListBase *lb, } else { int idcode= GS(tselem->id->name); - switch(idcode) { + switch (idcode) { case ID_SCE: *scenelevel= 1; break; diff --git a/source/blender/editors/space_outliner/space_outliner.c b/source/blender/editors/space_outliner/space_outliner.c index ed050b7f93d..c2a3affa1b6 100644 --- a/source/blender/editors/space_outliner/space_outliner.c +++ b/source/blender/editors/space_outliner/space_outliner.c @@ -182,9 +182,9 @@ static void outliner_main_area_free(ARegion *UNUSED(ar)) static void outliner_main_area_listener(ARegion *ar, wmNotifier *wmn) { /* context changes */ - switch(wmn->category) { + switch (wmn->category) { case NC_SCENE: - switch(wmn->data) { + switch (wmn->data) { case ND_OB_ACTIVE: case ND_OB_SELECT: case ND_OB_VISIBLE: @@ -200,7 +200,7 @@ static void outliner_main_area_listener(ARegion *ar, wmNotifier *wmn) } break; case NC_OBJECT: - switch(wmn->data) { + switch (wmn->data) { case ND_TRANSFORM: /* transform doesn't change outliner data */ break; @@ -212,7 +212,7 @@ static void outliner_main_area_listener(ARegion *ar, wmNotifier *wmn) ED_region_tag_redraw(ar); break; case ND_CONSTRAINT: - switch(wmn->action) { + switch (wmn->action) { case NA_ADDED: case NA_REMOVED: case NA_RENAME: @@ -244,7 +244,7 @@ static void outliner_main_area_listener(ARegion *ar, wmNotifier *wmn) ED_region_tag_redraw(ar); break; case NC_MATERIAL: - switch(wmn->data) { + switch (wmn->data) { case ND_SHADING: case ND_SHADING_DRAW: ED_region_tag_redraw(ar); @@ -255,7 +255,7 @@ static void outliner_main_area_listener(ARegion *ar, wmNotifier *wmn) ED_region_tag_redraw(ar); break; case NC_GEOM: - switch(wmn->data) { + switch (wmn->data) { case ND_DATA: /* needed for vertex groups only, no special notifier atm so use NC_GEOM|ND_DATA */ ED_region_tag_redraw(ar); @@ -263,7 +263,7 @@ static void outliner_main_area_listener(ARegion *ar, wmNotifier *wmn) } break; case NC_ANIMATION: - switch(wmn->data) { + switch (wmn->data) { case ND_NLA_ACTCHANGE: case ND_KEYFRAME: ED_region_tag_redraw(ar); @@ -299,7 +299,7 @@ static void outliner_header_area_free(ARegion *UNUSED(ar)) static void outliner_header_area_listener(ARegion *ar, wmNotifier *wmn) { /* context changes */ - switch(wmn->category) { + switch (wmn->category) { case NC_SCENE: if (wmn->data == ND_KEYINGSET) ED_region_tag_redraw(ar); -- cgit v1.2.3