From 02b927b8c4702cadf089f3e26fa553bdc66483b1 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 31 May 2012 18:40:06 +0000 Subject: style cleanup --- .../blender/editors/space_outliner/outliner_draw.c | 23 ++++++-- .../blender/editors/space_outliner/outliner_edit.c | 47 +++++++++------ .../editors/space_outliner/outliner_select.c | 6 +- .../editors/space_outliner/outliner_tools.c | 67 +++++++++++++++------- 4 files changed, 98 insertions(+), 45 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 fddd7af93f1..829973c744e 100644 --- a/source/blender/editors/space_outliner/outliner_draw.c +++ b/source/blender/editors/space_outliner/outliner_draw.c @@ -300,7 +300,8 @@ static void namebutton_cb(bContext *C, void *tsep, char *oldname) BLI_strncpy(expanded, lib->name, sizeof(expanded)); BLI_path_abs(expanded, G.main->name); if (!BLI_exists(expanded)) { - BKE_reportf(CTX_wm_reports(C), RPT_ERROR, "Library path '%s' does not exist, correct this before saving", expanded); + BKE_reportf(CTX_wm_reports(C), RPT_ERROR, + "Library path '%s' does not exist, correct this before saving", expanded); } } } @@ -570,7 +571,8 @@ static void operator_call_cb(struct bContext *UNUSED(C), void *arg_kmi, void *ar BLI_strncpy(kmi->idname, ot->idname, OP_MAX_TYPENAME); } -static void operator_search_cb(const struct bContext *UNUSED(C), void *UNUSED(arg_kmi), const char *str, uiSearchItems *items) +static void operator_search_cb(const struct bContext *UNUSED(C), void *UNUSED(arg_kmi), + const char *str, uiSearchItems *items) { GHashIterator *iter = WM_operatortype_iter(); @@ -1192,7 +1194,11 @@ static void outliner_draw_iconrow(bContext *C, uiBlock *block, Scene *scene, Spa uiSetRoundBox(UI_CNR_ALL); glColor4ub(255, 255, 255, 100); - uiRoundBox((float) *offsx - 0.5f * ufac, (float)ys - 1.0f * ufac, (float)*offsx + UI_UNIT_Y - 3.0f * ufac, (float)ys + UI_UNIT_Y - 3.0f * ufac, UI_UNIT_Y / 2.0f - 2.0f * ufac); + uiRoundBox((float) *offsx - 0.5f * ufac, + (float)ys - 1.0f * ufac, + (float)*offsx + UI_UNIT_Y - 3.0f * ufac, + (float)ys + UI_UNIT_Y - 3.0f * ufac, + (float)UI_UNIT_Y / 2.0f - 2.0f * ufac); glEnable(GL_BLEND); /* roundbox disables */ } @@ -1324,7 +1330,11 @@ static void outliner_draw_tree_element(bContext *C, uiBlock *block, Scene *scene /* active circle */ if (active) { uiSetRoundBox(UI_CNR_ALL); - uiRoundBox((float)startx + UI_UNIT_Y - 1.5f * ufac, (float)*starty + 2.0f * ufac, (float)startx + 2.0f * UI_UNIT_Y - 4.0f * ufac, (float)*starty + UI_UNIT_Y - 1.0f * ufac, UI_UNIT_Y / 2.0f - 2.0f * ufac); + uiRoundBox((float)startx + UI_UNIT_Y - 1.5f * ufac, + (float)*starty + 2.0f * ufac, + (float)startx + 2.0f * UI_UNIT_Y - 4.0f * ufac, + (float)*starty + UI_UNIT_Y - 1.0f * ufac, + UI_UNIT_Y / 2.0f - 2.0f * ufac); glEnable(GL_BLEND); /* roundbox disables it */ te->flag |= TE_ACTIVE; // for lookup in display hierarchies @@ -1549,7 +1559,10 @@ static void outliner_draw_restrictcols(ARegion *ar) /* background underneath */ UI_ThemeColor(TH_BACK); - glRecti((int)ar->v2d.cur.xmax - OL_TOGW, (int)ar->v2d.cur.ymin - V2D_SCROLL_HEIGHT - 1, (int)ar->v2d.cur.xmax + V2D_SCROLL_WIDTH, (int)ar->v2d.cur.ymax); + glRecti((int)ar->v2d.cur.xmax - OL_TOGW, + (int)ar->v2d.cur.ymin - V2D_SCROLL_HEIGHT - 1, + (int)ar->v2d.cur.xmax + V2D_SCROLL_WIDTH, + (int)ar->v2d.cur.ymax); UI_ThemeColorShade(TH_BACK, 6); ystart = (int)ar->v2d.tot.ymax; diff --git a/source/blender/editors/space_outliner/outliner_edit.c b/source/blender/editors/space_outliner/outliner_edit.c index 8a332e9329a..a752a7d71ae 100644 --- a/source/blender/editors/space_outliner/outliner_edit.c +++ b/source/blender/editors/space_outliner/outliner_edit.c @@ -205,7 +205,8 @@ static void do_item_rename(ARegion *ar, TreeElement *te, TreeStoreElem *tselem, } } -void item_rename_cb(bContext *C, Scene *UNUSED(scene), TreeElement *te, TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem) +void item_rename_cb(bContext *C, Scene *UNUSED(scene), TreeElement *te, + TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem) { ARegion *ar = CTX_wm_region(C); ReportList *reports = CTX_wm_reports(C); // XXX @@ -340,7 +341,8 @@ int common_restrict_check(bContext *C, Object *ob) /* Toggle Visibility ---------------------------------------- */ -void object_toggle_visibility_cb(bContext *C, Scene *scene, TreeElement *te, TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem) +void object_toggle_visibility_cb(bContext *C, Scene *scene, TreeElement *te, + TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem) { Base *base = (Base *)te->directdata; Object *ob = (Object *)tselem->id; @@ -355,7 +357,8 @@ void object_toggle_visibility_cb(bContext *C, Scene *scene, TreeElement *te, Tre } } -void group_toggle_visibility_cb(bContext *UNUSED(C), Scene *scene, TreeElement *UNUSED(te), TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem) +void group_toggle_visibility_cb(bContext *UNUSED(C), Scene *scene, TreeElement *UNUSED(te), + TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem) { Group *group = (Group *)tselem->id; restrictbutton_gr_restrict_flag(scene, group, OB_RESTRICT_VIEW); @@ -391,7 +394,8 @@ void OUTLINER_OT_visibility_toggle(wmOperatorType *ot) /* Toggle Selectability ---------------------------------------- */ -void object_toggle_selectability_cb(bContext *UNUSED(C), Scene *scene, TreeElement *te, TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem) +void object_toggle_selectability_cb(bContext *UNUSED(C), Scene *scene, TreeElement *te, + TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem) { Base *base = (Base *)te->directdata; @@ -401,7 +405,8 @@ void object_toggle_selectability_cb(bContext *UNUSED(C), Scene *scene, TreeEleme } } -void group_toggle_selectability_cb(bContext *UNUSED(C), Scene *scene, TreeElement *UNUSED(te), TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem) +void group_toggle_selectability_cb(bContext *UNUSED(C), Scene *scene, TreeElement *UNUSED(te), + TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem) { Group *group = (Group *)tselem->id; restrictbutton_gr_restrict_flag(scene, group, OB_RESTRICT_SELECT); @@ -437,7 +442,8 @@ void OUTLINER_OT_selectability_toggle(wmOperatorType *ot) /* Toggle Renderability ---------------------------------------- */ -void object_toggle_renderability_cb(bContext *UNUSED(C), Scene *scene, TreeElement *te, TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem) +void object_toggle_renderability_cb(bContext *UNUSED(C), Scene *scene, TreeElement *te, + TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem) { Base *base = (Base *)te->directdata; @@ -447,7 +453,8 @@ void object_toggle_renderability_cb(bContext *UNUSED(C), Scene *scene, TreeEleme } } -void group_toggle_renderability_cb(bContext *UNUSED(C), Scene *scene, TreeElement *UNUSED(te), TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem) +void group_toggle_renderability_cb(bContext *UNUSED(C), Scene *scene, TreeElement *UNUSED(te), + TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem) { Group *group = (Group *)tselem->id; restrictbutton_gr_restrict_flag(scene, group, OB_RESTRICT_RENDER); @@ -674,7 +681,8 @@ static void outliner_set_coordinates(ARegion *ar, SpaceOops *soops) } /* find next element that has this name */ -static TreeElement *outliner_find_name(SpaceOops *soops, ListBase *lb, char *name, int flags, TreeElement *prev, int *prevFound) +static TreeElement *outliner_find_name(SpaceOops *soops, ListBase *lb, char *name, int flags, + TreeElement *prev, int *prevFound) { TreeElement *te, *tes; @@ -961,7 +969,8 @@ static void tree_element_to_path(SpaceOops *soops, TreeElement *te, TreeStoreEle BLI_addhead(&hierarchy, ld); } - /* step 2: step down hierarchy building the path (NOTE: addhead in previous loop was needed so that we can loop like this) */ + /* step 2: step down hierarchy building the path + * (NOTE: addhead in previous loop was needed so that we can loop like this) */ for (ld = hierarchy.first; ld; ld = ld->next) { /* get data */ tem = (TreeElement *)ld->data; @@ -972,7 +981,7 @@ static void tree_element_to_path(SpaceOops *soops, TreeElement *te, TreeStoreEle /* check if we're looking for first ID, or appending to path */ if (*id) { /* just 'append' property to path - * - to prevent memory leaks, we must write to newpath not path, then free old path + swap them + * - to prevent memory leaks, we must write to newpath not path, then free old path + swap them */ if (tse->type == TSE_RNA_PROPERTY) { if (RNA_property_type(prop) == PROP_POINTER) { @@ -1019,7 +1028,8 @@ static void tree_element_to_path(SpaceOops *soops, TreeElement *te, TreeStoreEle else { /* no ID, so check if entry is RNA-struct, and if that RNA-struct is an ID datablock to extract info from */ if (tse->type == TSE_RNA_STRUCT) { - /* ptr->data not ptr->id.data seems to be the one we want, since ptr->data is sometimes the owner of this ID? */ + /* ptr->data not ptr->id.data seems to be the one we want, + * since ptr->data is sometimes the owner of this ID? */ if (RNA_struct_is_ID(ptr->type)) { *id = (ID *)ptr->data; @@ -1090,7 +1100,9 @@ static void do_outliner_drivers_editop(SpaceOops *soops, ListBase *tree, ReportL short groupmode = KSP_GROUP_KSNAME; /* check if RNA-property described by this selected element is an animatable prop */ - if (ELEM(tselem->type, TSE_RNA_PROPERTY, TSE_RNA_ARRAY_ELEM) && RNA_property_animateable(&te->rnaptr, te->directdata)) { + if (ELEM(tselem->type, TSE_RNA_PROPERTY, TSE_RNA_ARRAY_ELEM) && + RNA_property_animateable(&te->rnaptr, te->directdata)) + { /* get id + path + index info from the selected element */ tree_element_to_path(soops, te, tselem, &id, &path, &array_index, &flag, &groupmode); @@ -1269,7 +1281,9 @@ static void do_outliner_keyingset_editop(SpaceOops *soops, KeyingSet *ks, ListBa short groupmode = KSP_GROUP_KSNAME; /* check if RNA-property described by this selected element is an animatable prop */ - if (ELEM(tselem->type, TSE_RNA_PROPERTY, TSE_RNA_ARRAY_ELEM) && RNA_property_animateable(&te->rnaptr, te->directdata)) { + if (ELEM(tselem->type, TSE_RNA_PROPERTY, TSE_RNA_ARRAY_ELEM) && + RNA_property_animateable(&te->rnaptr, te->directdata)) + { /* get id + path + index info from the selected element */ tree_element_to_path(soops, te, tselem, &id, &path, &array_index, &flag, &groupmode); @@ -1282,7 +1296,8 @@ static void do_outliner_keyingset_editop(SpaceOops *soops, KeyingSet *ks, ListBa case KEYINGSET_EDITMODE_ADD: { /* add a new path with the information obtained (only if valid) */ - // TODO: what do we do with group name? for now, we don't supply one, and just let this use the KeyingSet name + /* TODO: what do we do with group name? + * for now, we don't supply one, and just let this use the KeyingSet name */ BKE_keyingset_add_path(ks, id, NULL, path, array_index, flag, groupmode); ks->active_path = BLI_countlist(&ks->paths); } @@ -1487,7 +1502,7 @@ static int parent_drop_invoke(bContext *C, wmOperator *op, wmEvent *event) scene = (Scene *)outliner_search_back(soops, te_found, ID_SCE); - if(scene == NULL) { + if (scene == NULL) { return OPERATOR_CANCELLED; } @@ -1671,7 +1686,7 @@ static int parent_clear_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(even /* then search backwards to get the scene */ scene = (Scene *)outliner_search_back(soops, te, ID_SCE); - if(scene == NULL) { + if (scene == NULL) { return OPERATOR_CANCELLED; } diff --git a/source/blender/editors/space_outliner/outliner_select.c b/source/blender/editors/space_outliner/outliner_select.c index 068532a08a2..812fba50295 100644 --- a/source/blender/editors/space_outliner/outliner_select.c +++ b/source/blender/editors/space_outliner/outliner_select.c @@ -670,7 +670,8 @@ int tree_element_active(bContext *C, Scene *scene, SpaceOops *soops, TreeElement /* generic call for non-id data to make/check active in UI */ /* Context can be NULL when set==0 */ -int tree_element_type_active(bContext *C, Scene *scene, SpaceOops *soops, TreeElement *te, TreeStoreElem *tselem, int set) +int tree_element_type_active(bContext *C, Scene *scene, SpaceOops *soops, + TreeElement *te, TreeStoreElem *tselem, int set) { switch (tselem->type) { case TSE_DEFGROUP: @@ -710,7 +711,8 @@ int tree_element_type_active(bContext *C, Scene *scene, SpaceOops *soops, TreeEl /* ================================================ */ -static int do_outliner_item_activate(bContext *C, Scene *scene, ARegion *ar, SpaceOops *soops, TreeElement *te, int extend, const float mval[2]) +static int do_outliner_item_activate(bContext *C, Scene *scene, ARegion *ar, SpaceOops *soops, + TreeElement *te, int extend, const float mval[2]) { if (mval[1] > te->ys && mval[1] < te->ys + UI_UNIT_Y) { diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c index 72b954b88e7..b556fbf5c9d 100644 --- a/source/blender/editors/space_outliner/outliner_tools.c +++ b/source/blender/editors/space_outliner/outliner_tools.c @@ -125,13 +125,15 @@ static void set_operation_types(SpaceOops *soops, ListBase *lb, } } -static void unlink_action_cb(bContext *C, Scene *UNUSED(scene), TreeElement *UNUSED(te), TreeStoreElem *tsep, TreeStoreElem *UNUSED(tselem)) +static void unlink_action_cb(bContext *C, Scene *UNUSED(scene), TreeElement *UNUSED(te), + TreeStoreElem *tsep, TreeStoreElem *UNUSED(tselem)) { /* just set action to NULL */ BKE_animdata_set_action(CTX_wm_reports(C), tsep->id, NULL); } -static void unlink_material_cb(bContext *UNUSED(C), Scene *UNUSED(scene), TreeElement *te, TreeStoreElem *tsep, TreeStoreElem *UNUSED(tselem)) +static void unlink_material_cb(bContext *UNUSED(C), Scene *UNUSED(scene), TreeElement *te, + TreeStoreElem *tsep, TreeStoreElem *UNUSED(tselem)) { Material **matar = NULL; int a, totcol = 0; @@ -165,7 +167,8 @@ static void unlink_material_cb(bContext *UNUSED(C), Scene *UNUSED(scene), TreeEl } } -static void unlink_texture_cb(bContext *UNUSED(C), Scene *UNUSED(scene), TreeElement *te, TreeStoreElem *tsep, TreeStoreElem *UNUSED(tselem)) +static void unlink_texture_cb(bContext *UNUSED(C), Scene *UNUSED(scene), TreeElement *te, + TreeStoreElem *tsep, TreeStoreElem *UNUSED(tselem)) { MTex **mtex = NULL; int a; @@ -194,7 +197,8 @@ static void unlink_texture_cb(bContext *UNUSED(C), Scene *UNUSED(scene), TreeEle } } -static void unlink_group_cb(bContext *UNUSED(C), Scene *UNUSED(scene), TreeElement *UNUSED(te), TreeStoreElem *tsep, TreeStoreElem *tselem) +static void unlink_group_cb(bContext *UNUSED(C), Scene *UNUSED(scene), TreeElement *UNUSED(te), + TreeStoreElem *tsep, TreeStoreElem *tselem) { Group *group = (Group *)tselem->id; @@ -209,7 +213,8 @@ static void unlink_group_cb(bContext *UNUSED(C), Scene *UNUSED(scene), TreeEleme } } -static void unlink_world_cb(bContext *UNUSED(C), Scene *UNUSED(scene), TreeElement *UNUSED(te), TreeStoreElem *tsep, TreeStoreElem *tselem) +static void unlink_world_cb(bContext *UNUSED(C), Scene *UNUSED(scene), TreeElement *UNUSED(te), + TreeStoreElem *tsep, TreeStoreElem *tselem) { Scene *parscene = (Scene *)tsep->id; World *wo = (World *)tselem->id; @@ -220,7 +225,8 @@ static void unlink_world_cb(bContext *UNUSED(C), Scene *UNUSED(scene), TreeEleme } static void outliner_do_libdata_operation(bContext *C, Scene *scene, SpaceOops *soops, ListBase *lb, - void (*operation_cb)(bContext *C, Scene *scene, TreeElement *, TreeStoreElem *, TreeStoreElem *)) + void (*operation_cb)(bContext *C, Scene *scene, TreeElement *, + TreeStoreElem *, TreeStoreElem *)) { TreeElement *te; TreeStoreElem *tselem; @@ -241,7 +247,8 @@ static void outliner_do_libdata_operation(bContext *C, Scene *scene, SpaceOops * /* */ -static void object_select_cb(bContext *UNUSED(C), Scene *scene, TreeElement *te, TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem) +static void object_select_cb(bContext *UNUSED(C), Scene *scene, TreeElement *te, + TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem) { Base *base = (Base *)te->directdata; @@ -252,7 +259,8 @@ static void object_select_cb(bContext *UNUSED(C), Scene *scene, TreeElement *te, } } -static void object_deselect_cb(bContext *UNUSED(C), Scene *scene, TreeElement *te, TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem) +static void object_deselect_cb(bContext *UNUSED(C), Scene *scene, TreeElement *te, + TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem) { Base *base = (Base *)te->directdata; @@ -263,7 +271,8 @@ static void object_deselect_cb(bContext *UNUSED(C), Scene *scene, TreeElement *t } } -static void object_delete_cb(bContext *C, Scene *scene, TreeElement *te, TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem) +static void object_delete_cb(bContext *C, Scene *scene, TreeElement *te, + TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem) { Base *base = (Base *)te->directdata; @@ -280,7 +289,8 @@ static void object_delete_cb(bContext *C, Scene *scene, TreeElement *te, TreeSto } } -static void id_local_cb(bContext *C, Scene *UNUSED(scene), TreeElement *UNUSED(te), TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem) +static void id_local_cb(bContext *C, Scene *UNUSED(scene), TreeElement *UNUSED(te), + TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem) { if (tselem->id->lib && (tselem->id->flag & LIB_EXTERN)) { /* if the ID type has no special local function, @@ -292,7 +302,8 @@ static void id_local_cb(bContext *C, Scene *UNUSED(scene), TreeElement *UNUSED(t } } -static void id_fake_user_set_cb(bContext *UNUSED(C), Scene *UNUSED(scene), TreeElement *UNUSED(te), TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem) +static void id_fake_user_set_cb(bContext *UNUSED(C), Scene *UNUSED(scene), TreeElement *UNUSED(te), + TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem) { ID *id = tselem->id; @@ -302,7 +313,8 @@ static void id_fake_user_set_cb(bContext *UNUSED(C), Scene *UNUSED(scene), TreeE } } -static void id_fake_user_clear_cb(bContext *UNUSED(C), Scene *UNUSED(scene), TreeElement *UNUSED(te), TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem) +static void id_fake_user_clear_cb(bContext *UNUSED(C), Scene *UNUSED(scene), TreeElement *UNUSED(te), + TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem) { ID *id = tselem->id; @@ -312,7 +324,8 @@ static void id_fake_user_clear_cb(bContext *UNUSED(C), Scene *UNUSED(scene), Tre } } -static void singleuser_action_cb(bContext *C, Scene *UNUSED(scene), TreeElement *UNUSED(te), TreeStoreElem *tsep, TreeStoreElem *tselem) +static void singleuser_action_cb(bContext *C, Scene *UNUSED(scene), TreeElement *UNUSED(te), + TreeStoreElem *tsep, TreeStoreElem *tselem) { ID *id = tselem->id; @@ -328,7 +341,8 @@ static void singleuser_action_cb(bContext *C, Scene *UNUSED(scene), TreeElement } } -static void singleuser_world_cb(bContext *C, Scene *UNUSED(scene), TreeElement *UNUSED(te), TreeStoreElem *tsep, TreeStoreElem *tselem) +static void singleuser_world_cb(bContext *C, Scene *UNUSED(scene), TreeElement *UNUSED(te), + TreeStoreElem *tsep, TreeStoreElem *tselem) { ID *id = tselem->id; @@ -345,7 +359,8 @@ static void singleuser_world_cb(bContext *C, Scene *UNUSED(scene), TreeElement * } } -static void group_linkobs2scene_cb(bContext *UNUSED(C), Scene *scene, TreeElement *UNUSED(te), TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem) +static void group_linkobs2scene_cb(bContext *UNUSED(C), Scene *scene, TreeElement *UNUSED(te), + TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem) { Group *group = (Group *)tselem->id; GroupObject *gob; @@ -371,7 +386,8 @@ static void group_linkobs2scene_cb(bContext *UNUSED(C), Scene *scene, TreeElemen } void outliner_do_object_operation(bContext *C, Scene *scene_act, SpaceOops *soops, ListBase *lb, - void (*operation_cb)(bContext *C, Scene *scene, TreeElement *, TreeStoreElem *, TreeStoreElem *)) + void (*operation_cb)(bContext *C, Scene *scene, TreeElement *, + TreeStoreElem *, TreeStoreElem *)) { TreeElement *te; TreeStoreElem *tselem; @@ -399,13 +415,15 @@ void outliner_do_object_operation(bContext *C, Scene *scene_act, SpaceOops *soop /* ******************************************** */ -static void unlinkact_animdata_cb(int UNUSED(event), TreeElement *UNUSED(te), TreeStoreElem *tselem, void *UNUSED(arg)) +static void unlinkact_animdata_cb(int UNUSED(event), TreeElement *UNUSED(te), + TreeStoreElem *tselem, void *UNUSED(arg)) { /* just set action to NULL */ BKE_animdata_set_action(NULL, tselem->id, NULL); } -static void cleardrivers_animdata_cb(int UNUSED(event), TreeElement *UNUSED(te), TreeStoreElem *tselem, void *UNUSED(arg)) +static void cleardrivers_animdata_cb(int UNUSED(event), TreeElement *UNUSED(te), + TreeStoreElem *tselem, void *UNUSED(arg)) { IdAdtTemplate *iat = (IdAdtTemplate *)tselem->id; @@ -413,7 +431,8 @@ static void cleardrivers_animdata_cb(int UNUSED(event), TreeElement *UNUSED(te), free_fcurves(&iat->adt->drivers); } -static void refreshdrivers_animdata_cb(int UNUSED(event), TreeElement *UNUSED(te), TreeStoreElem *tselem, void *UNUSED(arg)) +static void refreshdrivers_animdata_cb(int UNUSED(event), TreeElement *UNUSED(te), + TreeStoreElem *tselem, void *UNUSED(arg)) { IdAdtTemplate *iat = (IdAdtTemplate *)tselem->id; FCurve *fcu; @@ -713,7 +732,8 @@ static EnumPropertyItem prop_id_op_types[] = { {OUTLINER_IDOP_UNLINK, "UNLINK", 0, "Unlink", ""}, {OUTLINER_IDOP_LOCAL, "LOCAL", 0, "Make Local", ""}, {OUTLINER_IDOP_SINGLE, "SINGLE", 0, "Make Single User", ""}, - {OUTLINER_IDOP_FAKE_ADD, "ADD_FAKE", 0, "Add Fake User", "Ensure datablock gets saved even if it isn't in use (e.g. for motion and material libraries)"}, + {OUTLINER_IDOP_FAKE_ADD, "ADD_FAKE", 0, "Add Fake User", + "Ensure datablock gets saved even if it isn't in use (e.g. for motion and material libraries)"}, {OUTLINER_IDOP_FAKE_CLEAR, "CLEAR_FAKE", 0, "Clear Fake User", ""}, {OUTLINER_IDOP_RENAME, "RENAME", 0, "Rename", ""}, {0, NULL, 0, NULL, NULL} @@ -928,7 +948,9 @@ static int outliner_action_set_exec(bContext *C, wmOperator *op) else if (act->idroot == 0) { /* hopefully in this case (i.e. library of userless actions), the user knows what they're doing... */ BKE_reportf(op->reports, RPT_WARNING, - "Action '%s' does not specify what datablocks it can be used on. Try setting the 'ID Root Type' setting from the Datablocks Editor for this Action to avoid future problems", + "Action '%s' does not specify what datablocks it can be used on. " + "Try setting the 'ID Root Type' setting from the Datablocks Editor " + "for this Action to avoid future problems", act->id.name + 2); } @@ -1158,7 +1180,8 @@ void OUTLINER_OT_data_operation(wmOperatorType *ot) /* ******************** */ -static int do_outliner_operation_event(bContext *C, Scene *scene, ARegion *ar, SpaceOops *soops, TreeElement *te, wmEvent *event, const float mval[2]) +static int do_outliner_operation_event(bContext *C, Scene *scene, ARegion *ar, SpaceOops *soops, + TreeElement *te, wmEvent *event, const float mval[2]) { ReportList *reports = CTX_wm_reports(C); // XXX... -- cgit v1.2.3