diff options
author | Miika Hamalainen <blender@miikah.org> | 2011-09-05 21:06:09 +0400 |
---|---|---|
committer | Miika Hamalainen <blender@miikah.org> | 2011-09-05 21:06:09 +0400 |
commit | 42faf7ae41d807c2f9a94f40b774038af0c065ec (patch) | |
tree | 8460e4d70cf287da04b656748297521d0d3ef381 /source/blender/editors/space_outliner | |
parent | 79ef35889f850aa7173800bcf67918c14f3b1291 (diff) | |
parent | 59dbd53e72ae25edf247e49ea1e291af277fecc4 (diff) |
Merge with trunk r39928
Diffstat (limited to 'source/blender/editors/space_outliner')
8 files changed, 114 insertions, 108 deletions
diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c index 83b617973be..7df15fb5703 100644 --- a/source/blender/editors/space_outliner/outliner_draw.c +++ b/source/blender/editors/space_outliner/outliner_draw.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or @@ -238,7 +236,7 @@ static int group_select_flag(Group *gr) return 0; } -static void restrictbutton_gr_restrict_flag(void *poin, void *poin2, int flag) +void restrictbutton_gr_restrict_flag(void *poin, void *poin2, int flag) { Scene *scene = (Scene *)poin; GroupObject *gob; @@ -927,13 +925,7 @@ static void tselem_draw_icon(uiBlock *block, int xmax, float x, float y, TreeSto case TSE_NLA_ACTION: UI_icon_draw(x, y, ICON_ACTION); break; case TSE_DRIVER_BASE: - -#if 0 // GSOC_PEPPER - UI_icon_draw(x, y, ICON_DRIVER); break; - -#endif // GSOC_PEPPER - case TSE_DEFGROUP_BASE: UI_icon_draw(x, y, ICON_GROUP_VERTEX); break; case TSE_BONE: @@ -1094,14 +1086,8 @@ static void tselem_draw_icon(uiBlock *block, int xmax, float x, float y, TreeSto tselem_draw_icon_uibut(&arg, ICON_OUTLINER_OB_FONT); break; case OB_SURF: tselem_draw_icon_uibut(&arg, ICON_OUTLINER_OB_SURFACE); break; - -#if 0 // GSOC_PEPPER - case OB_SPEAKER: tselem_draw_icon_uibut(&arg, ICON_OUTLINER_OB_SPEAKER); break; - -#endif // GSOC_PEPPER - case OB_EMPTY: tselem_draw_icon_uibut(&arg, ICON_OUTLINER_OB_EMPTY); break; @@ -1145,15 +1131,9 @@ static void tselem_draw_icon(uiBlock *block, int xmax, float x, float y, TreeSto tselem_draw_icon_uibut(&arg, ICON_TEXTURE_DATA); break; case ID_IM: tselem_draw_icon_uibut(&arg, ICON_IMAGE_DATA); break; - -#if 0 // GSOC_PEPPER - case ID_SPK: case ID_SO: tselem_draw_icon_uibut(&arg, ICON_OUTLINER_DATA_SPEAKER); break; - -#endif // GSOC_PEPPER - case ID_AR: tselem_draw_icon_uibut(&arg, ICON_OUTLINER_DATA_ARMATURE); break; case ID_CA: diff --git a/source/blender/editors/space_outliner/outliner_edit.c b/source/blender/editors/space_outliner/outliner_edit.c index 15167a3ba2c..2b451a48748 100644 --- a/source/blender/editors/space_outliner/outliner_edit.c +++ b/source/blender/editors/space_outliner/outliner_edit.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or @@ -220,6 +218,34 @@ void OUTLINER_OT_item_openclose(wmOperatorType *ot) /* Rename --------------------------------------------------- */ +void do_item_rename(ARegion *ar, TreeElement *te, TreeStoreElem *tselem, ReportList *reports) +{ + /* can't rename rna datablocks entries */ + if(ELEM3(tselem->type, TSE_RNA_STRUCT, TSE_RNA_PROPERTY, TSE_RNA_ARRAY_ELEM)) + ; + else if(ELEM10(tselem->type, TSE_ANIM_DATA, TSE_NLA, TSE_DEFGROUP_BASE, TSE_CONSTRAINT_BASE, TSE_MODIFIER_BASE, TSE_SCRIPT_BASE, TSE_POSE_BASE, TSE_POSEGRP_BASE, TSE_R_LAYER_BASE, TSE_R_PASS)) + BKE_report(reports, RPT_WARNING, "Cannot edit builtin name"); + else if(ELEM3(tselem->type, TSE_SEQUENCE, TSE_SEQ_STRIP, TSE_SEQUENCE_DUP)) + BKE_report(reports, RPT_WARNING, "Cannot edit sequence name"); + else if(tselem->id->lib) { + // XXX error_libdata(); + } + else if(te->idcode == ID_LI && te->parent) { + BKE_report(reports, RPT_WARNING, "Cannot edit the path of an indirectly linked library"); + } + else { + tselem->flag |= TSE_TEXTBUT; + ED_region_tag_redraw(ar); + } +} + +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 + do_item_rename(ar, te, tselem, reports) ; +} + static int do_outliner_item_rename(bContext *C, ARegion *ar, SpaceOops *soops, TreeElement *te, const float mval[2]) { ReportList *reports= CTX_wm_reports(C); // XXX @@ -230,23 +256,7 @@ static int do_outliner_item_rename(bContext *C, ARegion *ar, SpaceOops *soops, T /* name and first icon */ if(mval[0]>te->xs+UI_UNIT_X && mval[0]<te->xend) { - /* can't rename rna datablocks entries */ - if(ELEM3(tselem->type, TSE_RNA_STRUCT, TSE_RNA_PROPERTY, TSE_RNA_ARRAY_ELEM)) - ; - else if(ELEM10(tselem->type, TSE_ANIM_DATA, TSE_NLA, TSE_DEFGROUP_BASE, TSE_CONSTRAINT_BASE, TSE_MODIFIER_BASE, TSE_SCRIPT_BASE, TSE_POSE_BASE, TSE_POSEGRP_BASE, TSE_R_LAYER_BASE, TSE_R_PASS)) - BKE_report(reports, RPT_WARNING, "Cannot edit builtin name"); - else if(ELEM3(tselem->type, TSE_SEQUENCE, TSE_SEQ_STRIP, TSE_SEQUENCE_DUP)) - BKE_report(reports, RPT_WARNING, "Cannot edit sequence name"); - else if(tselem->id->lib) { - // XXX error_libdata(); - } - else if(te->idcode == ID_LI && te->parent) { - BKE_report(reports, RPT_WARNING, "Cannot edit the path of an indirectly linked library"); - } - else { - tselem->flag |= TSE_TEXTBUT; - ED_region_tag_redraw(ar); - } + do_item_rename(ar, te, tselem, reports) ; } return 1; } @@ -379,6 +389,12 @@ 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) +{ + Group *group= (Group *)tselem->id; + restrictbutton_gr_restrict_flag(scene, group, OB_RESTRICT_VIEW); +} + static int outliner_toggle_visibility_exec(bContext *C, wmOperator *UNUSED(op)) { SpaceOops *soops= CTX_wm_space_outliner(C); @@ -419,6 +435,12 @@ 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) +{ + Group *group= (Group *)tselem->id; + restrictbutton_gr_restrict_flag(scene, group, OB_RESTRICT_SELECT); +} + static int outliner_toggle_selectability_exec(bContext *C, wmOperator *UNUSED(op)) { SpaceOops *soops= CTX_wm_space_outliner(C); @@ -459,6 +481,12 @@ 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) +{ + Group *group= (Group *)tselem->id; + restrictbutton_gr_restrict_flag(scene, group, OB_RESTRICT_RENDER); +} + static int outliner_toggle_renderability_exec(bContext *C, wmOperator *UNUSED(op)) { SpaceOops *soops= CTX_wm_space_outliner(C); diff --git a/source/blender/editors/space_outliner/outliner_intern.h b/source/blender/editors/space_outliner/outliner_intern.h index cf4ce9c06a8..61507d1ffe5 100644 --- a/source/blender/editors/space_outliner/outliner_intern.h +++ b/source/blender/editors/space_outliner/outliner_intern.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or @@ -131,6 +129,7 @@ typedef struct TreeElement { /* outliner_tree.c ----------------------------------------------- */ void outliner_free_tree(ListBase *lb); +void outliner_cleanup_tree(struct SpaceOops *soops); TreeElement *outliner_find_tse(struct SpaceOops *soops, TreeStoreElem *tse); TreeElement *outliner_find_id(struct SpaceOops *soops, ListBase *lb, struct ID *id); @@ -141,6 +140,7 @@ void outliner_build_tree(struct Main *mainvar, struct Scene *scene, struct Space /* outliner_draw.c ---------------------------------------------- */ void draw_outliner(const struct bContext *C); +void restrictbutton_gr_restrict_flag(void *poin, void *poin2, int flag); /* outliner_select.c -------------------------------------------- */ int tree_element_type_active(struct bContext *C, struct Scene *scene, struct SpaceOops *soops, TreeElement *te, TreeStoreElem *tselem, int set); @@ -160,6 +160,13 @@ void object_toggle_visibility_cb(struct bContext *C, struct Scene *scene, TreeEl void object_toggle_selectability_cb(struct bContext *C, struct Scene *scene, TreeElement *te, struct TreeStoreElem *tsep, struct TreeStoreElem *tselem); void object_toggle_renderability_cb(struct bContext *C, struct Scene *scene, TreeElement *te, struct TreeStoreElem *tsep, struct TreeStoreElem *tselem); + +void group_toggle_visibility_cb(struct bContext *C, struct Scene *scene, TreeElement *te, struct TreeStoreElem *tsep, struct TreeStoreElem *tselem); +void group_toggle_selectability_cb(struct bContext *C, struct Scene *scene, TreeElement *te, struct TreeStoreElem *tsep, struct TreeStoreElem *tselem); +void group_toggle_renderability_cb(struct bContext *C, struct Scene *scene, TreeElement *te, struct TreeStoreElem *tsep, struct TreeStoreElem *tselem); + +void item_rename_cb(struct bContext *C, struct Scene *scene, TreeElement *te, struct TreeStoreElem *tsep, struct TreeStoreElem *tselem); + /* ...................................................... */ void OUTLINER_OT_item_activate(struct wmOperatorType *ot); diff --git a/source/blender/editors/space_outliner/outliner_ops.c b/source/blender/editors/space_outliner/outliner_ops.c index f3e2c352172..0d3f2e85414 100644 --- a/source/blender/editors/space_outliner/outliner_ops.c +++ b/source/blender/editors/space_outliner/outliner_ops.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or @@ -58,13 +56,8 @@ void outliner_operatortypes(void) WM_operatortype_append(OUTLINER_OT_id_operation); WM_operatortype_append(OUTLINER_OT_data_operation); WM_operatortype_append(OUTLINER_OT_animdata_operation); - -#if 0 // GSOC_PEPPER - WM_operatortype_append(OUTLINER_OT_action_set); -#endif // GSOC_PEPPER - WM_operatortype_append(OUTLINER_OT_show_one_level); WM_operatortype_append(OUTLINER_OT_show_active); WM_operatortype_append(OUTLINER_OT_show_hierarchy); @@ -90,8 +83,8 @@ void outliner_keymap(wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "OUTLINER_OT_item_rename", LEFTMOUSE, KM_DBL_CLICK, 0, 0); - RNA_boolean_set(WM_keymap_add_item(keymap, "OUTLINER_OT_item_activate", LEFTMOUSE, KM_RELEASE, 0, 0)->ptr, "extend", 0); - RNA_boolean_set(WM_keymap_add_item(keymap, "OUTLINER_OT_item_activate", LEFTMOUSE, KM_PRESS, KM_SHIFT, 0)->ptr, "extend", 1); + RNA_boolean_set(WM_keymap_add_item(keymap, "OUTLINER_OT_item_activate", LEFTMOUSE, KM_CLICK, 0, 0)->ptr, "extend", 0); + RNA_boolean_set(WM_keymap_add_item(keymap, "OUTLINER_OT_item_activate", LEFTMOUSE, KM_CLICK, KM_SHIFT, 0)->ptr, "extend", 1); RNA_boolean_set(WM_keymap_add_item(keymap, "OUTLINER_OT_item_openclose", RETKEY, KM_PRESS, 0, 0)->ptr, "all", 0); RNA_boolean_set(WM_keymap_add_item(keymap, "OUTLINER_OT_item_openclose", RETKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "all", 1); diff --git a/source/blender/editors/space_outliner/outliner_select.c b/source/blender/editors/space_outliner/outliner_select.c index 46a9bde8267..2c0a8c34747 100644 --- a/source/blender/editors/space_outliner/outliner_select.c +++ b/source/blender/editors/space_outliner/outliner_select.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c index f5e1a67010e..b3170f9cd1e 100644 --- a/source/blender/editors/space_outliner/outliner_tools.c +++ b/source/blender/editors/space_outliner/outliner_tools.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or @@ -137,7 +135,7 @@ static void set_operation_types(SpaceOops *soops, ListBase *lb, break; case ID_ME: case ID_CU: case ID_MB: case ID_LT: - case ID_LA: case ID_AR: case ID_CA: /* case ID_SPK: */ /* GSOC_PEPPER */ + case ID_LA: case ID_AR: case ID_CA: case ID_SPK: case ID_MA: case ID_TE: case ID_IP: case ID_IM: case ID_SO: case ID_KE: case ID_WO: case ID_AC: case ID_NLA: case ID_TXT: case ID_GR: @@ -154,16 +152,12 @@ static void set_operation_types(SpaceOops *soops, ListBase *lb, } } -#if 0 // GSOC_PEPPER - 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); } -#endif // GSOC_PEPPER - static void unlink_material_cb(bContext *UNUSED(C), Scene *UNUSED(scene), TreeElement *te, TreeStoreElem *tsep, TreeStoreElem *UNUSED(tselem)) { Material **matar=NULL; @@ -293,6 +287,8 @@ static void object_delete_cb(bContext *C, Scene *scene, TreeElement *te, TreeSto if(base==NULL) base= object_in_scene((Object *)tselem->id, scene); if(base) { + SpaceOops *soops= CTX_wm_space_outliner(C); + // check also library later if(scene->obedit==base->object) ED_object_exit_editmode(C, EM_FREEDATA|EM_FREEUNDO|EM_WAITCURSOR|EM_DO_UNDO); @@ -300,6 +296,13 @@ static void object_delete_cb(bContext *C, Scene *scene, TreeElement *te, TreeSto ED_base_object_free_and_unlink(CTX_data_main(C), scene, base); te->directdata= NULL; tselem->id= NULL; + + /* XXX: tree management normally happens from draw_outliner(), but when + you're clicking to fast on Delete object from context menu in + outliner several mouse events can be handled in one cycle without + handling notifiers/redraw which leads to deleting the same object twice. + cleanup tree here to prevent such cases. */ + outliner_cleanup_tree(soops); } } @@ -333,8 +336,6 @@ static void id_fake_user_clear_cb(bContext *UNUSED(C), Scene *UNUSED(scene), Tre } } -#if 0 // GSOC_PEPPER - static void singleuser_action_cb(bContext *C, Scene *UNUSED(scene), TreeElement *UNUSED(te), TreeStoreElem *tsep, TreeStoreElem *tselem) { ID *id = tselem->id; @@ -351,8 +352,6 @@ static void singleuser_action_cb(bContext *C, Scene *UNUSED(scene), TreeElement } } -#endif - static void group_linkobs2scene_cb(bContext *UNUSED(C), Scene *scene, TreeElement *UNUSED(te), TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem) { Group *group= (Group *)tselem->id; @@ -406,16 +405,12 @@ void outliner_do_object_operation(bContext *C, Scene *scene_act, SpaceOops *soop /* ******************************************** */ -#if 0 // GSOC_PEPPER - static void unlinkact_animdata_cb(int UNUSED(event), TreeElement *UNUSED(te), TreeStoreElem *tselem) { /* just set action to NULL */ BKE_animdata_set_action(NULL, tselem->id, NULL); } -#endif // GSOC_PEPPER - static void cleardrivers_animdata_cb(int UNUSED(event), TreeElement *UNUSED(te), TreeStoreElem *tselem) { IdAdtTemplate *iat = (IdAdtTemplate *)tselem->id; @@ -524,6 +519,7 @@ static EnumPropertyItem prop_object_op_types[] = { {6, "TOGVIS", 0, "Toggle Visible", ""}, {7, "TOGSEL", 0, "Toggle Selectable", ""}, {8, "TOGREN", 0, "Toggle Renderable", ""}, + {9, "RENAME", 0, "Rename", ""}, {0, NULL, 0, NULL, NULL} }; @@ -581,6 +577,10 @@ static int outliner_object_operation_exec(bContext *C, wmOperator *op) str= "Toggle Renderability"; WM_event_add_notifier(C, NC_SCENE|ND_OB_RENDER, scene); } + else if(event==9) { + outliner_do_object_operation(C, scene, soops, &soops->tree, item_rename_cb); + str= "Rename Object"; + } ED_undo_push(C, str); @@ -614,6 +614,7 @@ static EnumPropertyItem prop_group_op_types[] = { {4, "TOGVIS", 0, "Toggle Visible", ""}, {5, "TOGSEL", 0, "Toggle Selectable", ""}, {6, "TOGREN", 0, "Toggle Renderable", ""}, + {7, "RENAME", 0, "Rename", ""}, {0, NULL, 0, NULL, NULL} }; @@ -622,6 +623,7 @@ static int outliner_group_operation_exec(bContext *C, wmOperator *op) Scene *scene= CTX_data_scene(C); SpaceOops *soops= CTX_wm_space_outliner(C); int event; + const char *str= NULL; /* check for invalid states */ if (soops == NULL) @@ -631,18 +633,35 @@ static int outliner_group_operation_exec(bContext *C, wmOperator *op) if(event==1) { outliner_do_libdata_operation(C, scene, soops, &soops->tree, unlink_group_cb); - ED_undo_push(C, "Unlink group"); + str= "Unlink group"; } else if(event==2) { outliner_do_libdata_operation(C, scene, soops, &soops->tree, id_local_cb); - ED_undo_push(C, "Localized Data"); + str= "Localized Data"; } else if(event==3) { outliner_do_libdata_operation(C, scene, soops, &soops->tree, group_linkobs2scene_cb); - ED_undo_push(C, "Link Group Objects to Scene"); + str= "Link Group Objects to Scene"; + } + else if(event==4) { + outliner_do_libdata_operation(C, scene, soops, &soops->tree, group_toggle_visibility_cb); + str= "Toggle Visibility"; + } + else if(event==5) { + outliner_do_libdata_operation(C, scene, soops, &soops->tree, group_toggle_selectability_cb); + str= "Toggle Selectability"; + } + else if(event==6) { + outliner_do_libdata_operation(C, scene, soops, &soops->tree, group_toggle_renderability_cb); + str= "Toggle Renderability"; + } + else if(event==7) { + outliner_do_libdata_operation(C, scene, soops, &soops->tree, item_rename_cb); + str= "Rename"; } + ED_undo_push(C, str); WM_event_add_notifier(C, NC_GROUP, NULL); return OPERATOR_FINISHED; @@ -676,7 +695,8 @@ typedef enum eOutlinerIdOpTypes { OUTLINER_IDOP_SINGLE, OUTLINER_IDOP_FAKE_ADD, - OUTLINER_IDOP_FAKE_CLEAR + OUTLINER_IDOP_FAKE_CLEAR, + OUTLINER_IDOP_RENAME } eOutlinerIdOpTypes; // TODO: implement support for changing the ID-block used @@ -686,6 +706,7 @@ static EnumPropertyItem prop_id_op_types[] = { {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_CLEAR, "CLEAR_FAKE", 0, "Clear Fake User", ""}, + {OUTLINER_IDOP_RENAME, "RENAME", 0, "Rename", ""}, {0, NULL, 0, NULL, NULL} }; @@ -709,18 +730,12 @@ static int outliner_id_operation_exec(bContext *C, wmOperator *op) { /* unlink datablock from its parent */ switch (idlevel) { - -#if 0 // GSOC_PEPPER - case ID_AC: outliner_do_libdata_operation(C, scene, soops, &soops->tree, unlink_action_cb); WM_event_add_notifier(C, NC_ANIMATION|ND_NLA_ACTCHANGE, NULL); ED_undo_push(C, "Unlink action"); break; - -#endif // GSOC_PEPPER - case ID_MA: outliner_do_libdata_operation(C, scene, soops, &soops->tree, unlink_material_cb); @@ -748,8 +763,6 @@ static int outliner_id_operation_exec(bContext *C, wmOperator *op) } break; -#if 0 // GSOC_PEPPER - case OUTLINER_IDOP_SINGLE: { /* make single user */ @@ -768,8 +781,6 @@ static int outliner_id_operation_exec(bContext *C, wmOperator *op) } break; -#endif // GSOC_PEPPER - case OUTLINER_IDOP_FAKE_ADD: { /* set fake user */ @@ -789,6 +800,14 @@ static int outliner_id_operation_exec(bContext *C, wmOperator *op) ED_undo_push(C, "Clear Fake User"); } break; + case OUTLINER_IDOP_RENAME: + /* rename */ + outliner_do_libdata_operation(C, scene, soops, &soops->tree, item_rename_cb); + + WM_event_add_notifier(C, NC_ID|NA_EDITED, NULL); + ED_undo_push(C, "Rename"); + + break; default: // invalid - unhandled @@ -846,9 +865,7 @@ static void outliner_do_id_set_operation(SpaceOops *soops, int type, ListBase *l /* ------------------------------------------ */ -#if 0 // GSOC_PEPPER - -static void actionset_id_cb(TreeElement *te, TreeStoreElem *tselem, TreeStoreElem *tsep, ID *actId) +static void actionset_id_cb(TreeElement *UNUSED(te), TreeStoreElem *tselem, TreeStoreElem *tsep, ID *actId) { bAction *act = (bAction *)actId; @@ -932,8 +949,6 @@ void OUTLINER_OT_action_set(wmOperatorType *ot) ot->prop= prop; } -#endif // GSOC_PEPPER - /* **************************************** */ typedef enum eOutliner_AnimDataOps { @@ -978,9 +993,6 @@ static int outliner_animdata_operation_exec(bContext *C, wmOperator *op) /* perform the core operation */ switch (event) { - -#if 0 // GSOC_PEPPER - case OUTLINER_ANIMOP_SET_ACT: /* delegate once again... */ WM_operator_name_call(C, "OUTLINER_OT_action_set", WM_OP_INVOKE_REGION_WIN, NULL); @@ -994,8 +1006,6 @@ static int outliner_animdata_operation_exec(bContext *C, wmOperator *op) ED_undo_push(C, "Unlink action"); break; -#endif // GSOC_PEPPER - case OUTLINER_ANIMOP_REFRESH_DRV: outliner_do_data_operation(soops, datalevel, event, &soops->tree, refreshdrivers_animdata_cb); diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c index 74e9e775087..8904dcc360f 100644 --- a/source/blender/editors/space_outliner/outliner_tree.c +++ b/source/blender/editors/space_outliner/outliner_tree.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or @@ -52,13 +50,7 @@ #include "DNA_scene_types.h" #include "DNA_world_types.h" #include "DNA_sequence_types.h" - -#if 0 // GSOC_PEPPER - #include "DNA_speaker_types.h" - -#endif // GSOC_PEPPER - #include "DNA_object_types.h" #include "BLI_blenlib.h" @@ -230,6 +222,12 @@ void outliner_free_tree(ListBase *lb) } } +void outliner_cleanup_tree(SpaceOops *soops) +{ + outliner_free_tree(&soops->tree); + outliner_storage_cleanup(soops); +} + /* Find ith item from the treestore */ static TreeElement *outliner_find_tree_element(ListBase *lb, int store_index) { @@ -723,9 +721,6 @@ static void outliner_add_id_contents(SpaceOops *soops, TreeElement *te, TreeStor } } break; - -#if 0 // GSOC_PEPPER - case ID_SPK: { Speaker *spk= (Speaker *)id; @@ -734,9 +729,6 @@ static void outliner_add_id_contents(SpaceOops *soops, TreeElement *te, TreeStor outliner_add_element(soops, &te->subtree, spk, te, TSE_ANIM_DATA, 0); } break; - -#endif // GSOC_PEPPER - case ID_WO: { World *wrld= (World *)id; diff --git a/source/blender/editors/space_outliner/space_outliner.c b/source/blender/editors/space_outliner/space_outliner.c index 603be557a3c..49d8b6b5da4 100644 --- a/source/blender/editors/space_outliner/space_outliner.c +++ b/source/blender/editors/space_outliner/space_outliner.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or |