From e701f9b67010279db02ceb51f7d08078cb34170a Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 29 Apr 2012 15:47:02 +0000 Subject: style cleanup: whitespace / commas --- .../blender/editors/space_outliner/outliner_draw.c | 32 +++++++++++----------- .../blender/editors/space_outliner/outliner_edit.c | 8 +++--- .../editors/space_outliner/outliner_select.c | 2 +- .../editors/space_outliner/outliner_tools.c | 12 ++++---- .../blender/editors/space_outliner/outliner_tree.c | 18 ++++++------ 5 files changed, 36 insertions(+), 36 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 7b2bbf3e285..52089c87f61 100644 --- a/source/blender/editors/space_outliner/outliner_draw.c +++ b/source/blender/editors/space_outliner/outliner_draw.c @@ -77,7 +77,7 @@ static void outliner_height(SpaceOops *soops, ListBase *lb, int *h) TreeElement *te= lb->first; while (te) { TreeStoreElem *tselem= TREESTORE(te); - if (TSELEM_OPEN(tselem,soops)) + if (TSELEM_OPEN(tselem, soops)) outliner_height(soops, &te->subtree, h); (*h) += UI_UNIT_Y; te= te->next; @@ -92,7 +92,7 @@ static void outliner_width(SpaceOops *soops, ListBase *lb, int *w) // TreeStoreElem *tselem= TREESTORE(te); // XXX fixme... te->xend is not set yet - if (!TSELEM_OPEN(tselem,soops)) { + if (!TSELEM_OPEN(tselem, soops)) { if (te->xend > *w) *w = te->xend; } @@ -117,7 +117,7 @@ static void outliner_rna_width(SpaceOops *soops, ListBase *lb, int *w, int start if (startx+100 > *w) *w = startx+100; - if (TSELEM_OPEN(tselem,soops)) + if (TSELEM_OPEN(tselem, soops)) outliner_rna_width(soops, &te->subtree, w, startx+UI_UNIT_X); te= te->next; } @@ -505,7 +505,7 @@ static void outliner_draw_restrictbuts(uiBlock *block, Scene *scene, ARegion *ar } } - if (TSELEM_OPEN(tselem,soops)) outliner_draw_restrictbuts(block, scene, ar, soops, &te->subtree); + if (TSELEM_OPEN(tselem, soops)) outliner_draw_restrictbuts(block, scene, ar, soops, &te->subtree); } } @@ -546,7 +546,7 @@ static void outliner_draw_rnabuts(uiBlock *block, Scene *scene, ARegion *ar, Spa ptr= &te->rnaptr; prop= te->directdata; - if (!(RNA_property_type(prop) == PROP_POINTER && (TSELEM_OPEN(tselem,soops))) ) + if (!(RNA_property_type(prop) == PROP_POINTER && (TSELEM_OPEN(tselem, soops))) ) uiDefAutoButR(block, ptr, prop, -1, "", ICON_NONE, sizex, (int)te->ys, OL_RNA_COL_SIZEX, UI_UNIT_Y-1); } else if (tselem->type == TSE_RNA_ARRAY_ELEM) { @@ -557,7 +557,7 @@ static void outliner_draw_rnabuts(uiBlock *block, Scene *scene, ARegion *ar, Spa } } - if (TSELEM_OPEN(tselem,soops)) outliner_draw_rnabuts(block, scene, ar, soops, sizex, &te->subtree); + if (TSELEM_OPEN(tselem, soops)) outliner_draw_rnabuts(block, scene, ar, soops, sizex, &te->subtree); } } @@ -783,7 +783,7 @@ static void outliner_draw_keymapbuts(uiBlock *block, ARegion *ar, SpaceOops *soo break; case OL_KM_MOUSE: str= keymap_mouse_menu(); - uiDefButS(block, MENU, 0, str, xstart,(int)te->ys+1, butw2, UI_UNIT_Y-1, &kmi->type, 0, 0, 0, 0, "Mouse button"); + uiDefButS(block, MENU, 0, str, xstart, (int)te->ys+1, butw2, UI_UNIT_Y-1, &kmi->type, 0, 0, 0, 0, "Mouse button"); xstart+= butw2+5; break; case OL_KM_TWEAK: @@ -814,7 +814,7 @@ static void outliner_draw_keymapbuts(uiBlock *block, ARegion *ar, SpaceOops *soo } } - if (TSELEM_OPEN(tselem,soops)) outliner_draw_keymapbuts(block, ar, soops, &te->subtree); + if (TSELEM_OPEN(tselem, soops)) outliner_draw_keymapbuts(block, ar, soops, &te->subtree); } } @@ -857,7 +857,7 @@ static void outliner_buttons(const bContext *C, uiBlock *block, ARegion *ar, Spa } } - if (TSELEM_OPEN(tselem,soops)) outliner_buttons(C, block, ar, soops, &te->subtree); + if (TSELEM_OPEN(tselem, soops)) outliner_buttons(C, block, ar, soops, &te->subtree); } } @@ -1332,7 +1332,7 @@ static void outliner_draw_tree_element(bContext *C, uiBlock *block, Scene *scene icon_x = startx+5*ufac; // icons a bit higher - if (TSELEM_OPEN(tselem,soops)) + if (TSELEM_OPEN(tselem, soops)) UI_icon_draw((float)icon_x, (float)*starty+2*ufac, ICON_DISCLOSURE_TRI_DOWN); else UI_icon_draw((float)icon_x, (float)*starty+2*ufac, ICON_DISCLOSURE_TRI_RIGHT); @@ -1371,7 +1371,7 @@ static void outliner_draw_tree_element(bContext *C, uiBlock *block, Scene *scene offsx+= (int)(UI_UNIT_X + UI_GetStringWidth(te->name)); /* closed item, we draw the icons, not when it's a scene, or master-server list though */ - if (!TSELEM_OPEN(tselem,soops)) { + if (!TSELEM_OPEN(tselem, soops)) { if (te->subtree.first) { if (tselem->type==0 && te->idcode==ID_SCE); else if (tselem->type!=TSE_R_LAYER) { /* this tree element always has same amount of branches, so don't draw */ @@ -1397,7 +1397,7 @@ static void outliner_draw_tree_element(bContext *C, uiBlock *block, Scene *scene te->ys= (float)*starty; te->xend= startx+offsx; - if (TSELEM_OPEN(tselem,soops)) { + if (TSELEM_OPEN(tselem, soops)) { *starty-= UI_UNIT_Y; for (ten= te->subtree.first; ten; ten= ten->next) @@ -1430,7 +1430,7 @@ static void outliner_draw_hierarchy(SpaceOops *soops, ListBase *lb, int startx, *starty-= UI_UNIT_Y; - if (TSELEM_OPEN(tselem,soops)) + if (TSELEM_OPEN(tselem, soops)) outliner_draw_hierarchy(soops, &te->subtree, startx+UI_UNIT_X, starty); } @@ -1454,12 +1454,12 @@ static void outliner_draw_struct_marks(ARegion *ar, SpaceOops *soops, ListBase * tselem= TREESTORE(te); /* selection status */ - if (TSELEM_OPEN(tselem,soops)) + if (TSELEM_OPEN(tselem, soops)) if (tselem->type == TSE_RNA_STRUCT) glRecti(0, *starty+1, (int)ar->v2d.cur.xmax+V2D_SCROLL_WIDTH, *starty+UI_UNIT_Y-1); *starty-= UI_UNIT_Y; - if (TSELEM_OPEN(tselem,soops)) { + if (TSELEM_OPEN(tselem, soops)) { outliner_draw_struct_marks(ar, soops, &te->subtree, starty); if (tselem->type == TSE_RNA_STRUCT) fdrawline(0, (float)*starty+UI_UNIT_Y, ar->v2d.cur.xmax+V2D_SCROLL_WIDTH, (float)*starty+UI_UNIT_Y); @@ -1480,7 +1480,7 @@ static void outliner_draw_selection(ARegion *ar, SpaceOops *soops, ListBase *lb, glRecti(0, *starty+1, (int)ar->v2d.cur.xmax, *starty+UI_UNIT_Y-1); } *starty-= UI_UNIT_Y; - if (TSELEM_OPEN(tselem,soops)) outliner_draw_selection(ar, soops, &te->subtree, starty); + if (TSELEM_OPEN(tselem, soops)) outliner_draw_selection(ar, soops, &te->subtree, starty); } } diff --git a/source/blender/editors/space_outliner/outliner_edit.c b/source/blender/editors/space_outliner/outliner_edit.c index 62d93f62d0f..7b200e9593d 100644 --- a/source/blender/editors/space_outliner/outliner_edit.c +++ b/source/blender/editors/space_outliner/outliner_edit.c @@ -652,7 +652,7 @@ static void outliner_set_coordinates_element(SpaceOops *soops, TreeElement *te, te->ys= (float)(*starty); *starty-= UI_UNIT_Y; - if (TSELEM_OPEN(tselem,soops)) { + if (TSELEM_OPEN(tselem, soops)) { TreeElement *ten; for (ten= te->subtree.first; ten; ten= ten->next) { outliner_set_coordinates_element(soops, ten, startx+UI_UNIT_X, starty); @@ -875,7 +875,7 @@ static void tree_element_show_hierarchy(Scene *scene, SpaceOops *soops, ListBase } else tselem->flag |= TSE_CLOSED; - if (TSELEM_OPEN(tselem,soops)) tree_element_show_hierarchy(scene, soops, &te->subtree); + if (TSELEM_OPEN(tselem, soops)) tree_element_show_hierarchy(scene, soops, &te->subtree); } } @@ -1140,7 +1140,7 @@ static void do_outliner_drivers_editop(SpaceOops *soops, ListBase *tree, ReportL } /* go over sub-tree */ - if (TSELEM_OPEN(tselem,soops)) + if (TSELEM_OPEN(tselem, soops)) do_outliner_drivers_editop(soops, &te->subtree, reports, mode); } } @@ -1308,7 +1308,7 @@ static void do_outliner_keyingset_editop(SpaceOops *soops, KeyingSet *ks, ListBa } /* go over sub-tree */ - if (TSELEM_OPEN(tselem,soops)) + if (TSELEM_OPEN(tselem, soops)) do_outliner_keyingset_editop(soops, ks, &te->subtree, mode); } } diff --git a/source/blender/editors/space_outliner/outliner_select.c b/source/blender/editors/space_outliner/outliner_select.c index 5515ec45269..00b3979b074 100644 --- a/source/blender/editors/space_outliner/outliner_select.c +++ b/source/blender/editors/space_outliner/outliner_select.c @@ -99,7 +99,7 @@ static int outliner_select(SpaceOops *soops, ListBase *lb, int *index, short *se change |= 1; } } - else if (TSELEM_OPEN(tselem,soops)) { + else if (TSELEM_OPEN(tselem, soops)) { /* Only try selecting sub-elements if we haven't hit the right element yet * * Hack warning: diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c index 13e86209f3a..88e3bac7910 100644 --- a/source/blender/editors/space_outliner/outliner_tools.c +++ b/source/blender/editors/space_outliner/outliner_tools.c @@ -115,9 +115,9 @@ static void set_operation_types(SpaceOops *soops, ListBase *lb, } } } - if (TSELEM_OPEN(tselem,soops)) { + if (TSELEM_OPEN(tselem, soops)) { set_operation_types(soops, &te->subtree, - scenelevel, objectlevel, idlevel, datalevel); + scenelevel, objectlevel, idlevel, datalevel); } } } @@ -230,7 +230,7 @@ static void outliner_do_libdata_operation(bContext *C, Scene *scene, SpaceOops * operation_cb(C, scene, te, tsep, tselem); } } - if (TSELEM_OPEN(tselem,soops)) { + if (TSELEM_OPEN(tselem, soops)) { outliner_do_libdata_operation(C, scene, soops, &te->subtree, operation_cb); } } @@ -388,7 +388,7 @@ void outliner_do_object_operation(bContext *C, Scene *scene_act, SpaceOops *soop operation_cb(C, scene_owner ? scene_owner : scene_act, te, NULL, tselem); } } - if (TSELEM_OPEN(tselem,soops)) { + if (TSELEM_OPEN(tselem, soops)) { outliner_do_object_operation(C, scene_act, soops, &te->subtree, operation_cb); } } @@ -495,7 +495,7 @@ static void outliner_do_data_operation(SpaceOops *soops, int type, int event, Li operation_cb(event, te, tselem); } } - if (TSELEM_OPEN(tselem,soops)) { + if (TSELEM_OPEN(tselem, soops)) { outliner_do_data_operation(soops, type, event, &te->subtree, operation_cb); } } @@ -870,7 +870,7 @@ static void outliner_do_id_set_operation(SpaceOops *soops, int type, ListBase *l operation_cb(te, tselem, tsep, newid); } } - if (TSELEM_OPEN(tselem,soops)) { + if (TSELEM_OPEN(tselem, soops)) { outliner_do_id_set_operation(soops, type, &te->subtree, newid, operation_cb); } } diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c index e2d43386c5e..026132e1f16 100644 --- a/source/blender/editors/space_outliner/outliner_tree.c +++ b/source/blender/editors/space_outliner/outliner_tree.c @@ -538,7 +538,7 @@ static void outliner_add_object_contents(SpaceOops *soops, TreeElement *te, Tree int index; temod->name = "Modifiers"; - for (index=0,md=ob->modifiers.first; md; index++,md=md->next) { + for (index=0, md=ob->modifiers.first; md; index++, md=md->next) { TreeElement *te = outliner_add_element(soops, &temod->subtree, ob, temod, TSE_MODIFIER, index); te->name= md->name; te->directdata = md; @@ -956,7 +956,7 @@ static TreeElement *outliner_add_element(SpaceOops *soops, ListBase *lb, void *i te->name= RNA_struct_ui_name(ptr->type); /* If searching don't expand RNA entries */ - if (SEARCHING_OUTLINER(soops) && BLI_strcasecmp("RNA",te->name)==0) tselem->flag &= ~TSE_CHILDSEARCH; + if (SEARCHING_OUTLINER(soops) && BLI_strcasecmp("RNA", te->name)==0) tselem->flag &= ~TSE_CHILDSEARCH; iterprop= RNA_struct_iterator_property(ptr->type); tot= RNA_property_collection_length(ptr, iterprop); @@ -966,7 +966,7 @@ static TreeElement *outliner_add_element(SpaceOops *soops, ListBase *lb, void *i if (!tselem->used) tselem->flag &= ~TSE_CLOSED; - if (TSELEM_OPEN(tselem,soops)) { + if (TSELEM_OPEN(tselem, soops)) { for (a=0; asubtree, (void*)ptr, te, TSE_RNA_PROPERTY, a); } @@ -988,13 +988,13 @@ static TreeElement *outliner_add_element(SpaceOops *soops, ListBase *lb, void *i te->rnaptr= *ptr; /* If searching don't expand RNA entries */ - if (SEARCHING_OUTLINER(soops) && BLI_strcasecmp("RNA",te->name)==0) tselem->flag &= ~TSE_CHILDSEARCH; + if (SEARCHING_OUTLINER(soops) && BLI_strcasecmp("RNA", te->name)==0) tselem->flag &= ~TSE_CHILDSEARCH; if (proptype == PROP_POINTER) { pptr= RNA_property_pointer_get(ptr, prop); if (pptr.data) { - if (TSELEM_OPEN(tselem,soops)) + if (TSELEM_OPEN(tselem, soops)) outliner_add_element(soops, &te->subtree, (void*)&pptr, te, TSE_RNA_STRUCT, -1); else te->flag |= TE_LAZY_CLOSED; @@ -1003,7 +1003,7 @@ static TreeElement *outliner_add_element(SpaceOops *soops, ListBase *lb, void *i else if (proptype == PROP_COLLECTION) { tot= RNA_property_collection_length(ptr, prop); - if (TSELEM_OPEN(tselem,soops)) { + if (TSELEM_OPEN(tselem, soops)) { for (a=0; asubtree, (void*)&pptr, te, TSE_RNA_STRUCT, a); @@ -1015,7 +1015,7 @@ static TreeElement *outliner_add_element(SpaceOops *soops, ListBase *lb, void *i else if (ELEM3(proptype, PROP_BOOLEAN, PROP_INT, PROP_FLOAT)) { tot= RNA_property_array_length(ptr, prop); - if (TSELEM_OPEN(tselem,soops)) { + if (TSELEM_OPEN(tselem, soops)) { for (a=0; asubtree, (void*)ptr, te, TSE_RNA_ARRAY_ELEM, a); } @@ -1048,7 +1048,7 @@ static TreeElement *outliner_add_element(SpaceOops *soops, ListBase *lb, void *i te->directdata= idv; te->name= km->idname; - if (TSELEM_OPEN(tselem,soops)) { + if (TSELEM_OPEN(tselem, soops)) { a= 0; for (kmi = km->items.first; kmi; kmi = kmi->next, a++) { @@ -1351,7 +1351,7 @@ static int outliner_filter_tree(SpaceOops *soops, ListBase *lb) /* flag as not a found item */ tselem->flag &= ~TSE_SEARCHMATCH; - if ((!TSELEM_OPEN(tselem,soops)) || outliner_filter_tree(soops, &te->subtree)==0) { + if ((!TSELEM_OPEN(tselem, soops)) || outliner_filter_tree(soops, &te->subtree)==0) { outliner_free_tree(&te->subtree); BLI_remlink(lb, te); -- cgit v1.2.3