diff options
author | Ton Roosendaal <ton@blender.org> | 2006-11-08 15:03:10 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2006-11-08 15:03:10 +0300 |
commit | 6685c0d571059e1ad84cd4617e18301d9090dbca (patch) | |
tree | aca2ecf4d23f8c5c7dfa2a0a50ed06786339b2f9 /source | |
parent | 6106b1648fa6372072cf0062809afab7d21951c3 (diff) |
Patch #5069, by Juho Vepsäläinen (bebraw)
Enable to use Xkey or DEL for deleting objects in outliner.
Note: there's reasons to be a bit reluctant with extensions like this.
Mostly related to the fact that outliner operations is completely unfinished
still. We need to spend time on thinking over how it should evolve, and
based on that the proper hotkeys and menus can be added as well.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/include/BIF_outliner.h | 1 | ||||
-rw-r--r-- | source/blender/src/outliner.c | 12 | ||||
-rw-r--r-- | source/blender/src/space.c | 4 |
3 files changed, 15 insertions, 2 deletions
diff --git a/source/blender/include/BIF_outliner.h b/source/blender/include/BIF_outliner.h index 78557796467..4d281e08c14 100644 --- a/source/blender/include/BIF_outliner.h +++ b/source/blender/include/BIF_outliner.h @@ -90,6 +90,7 @@ extern void outliner_show_hierarchy(struct ScrArea *sa); extern void outliner_one_level(struct ScrArea *sa, int add); extern void outliner_select(struct ScrArea *sa); extern void outliner_toggle_selected(struct ScrArea *sa); +extern void outliner_del(struct ScrArea *sa); extern void outliner_operation_menu(struct ScrArea *sa); extern void outliner_page_up_down(struct ScrArea *sa, int up); extern void outliner_find_panel(struct ScrArea *sa, int again, int flags); diff --git a/source/blender/src/outliner.c b/source/blender/src/outliner.c index 673ee677be6..1f15bb62205 100644 --- a/source/blender/src/outliner.c +++ b/source/blender/src/outliner.c @@ -2439,6 +2439,16 @@ static void outliner_do_data_operation(SpaceOops *soops, int type, int event, Li } } +void outliner_del(ScrArea *sa) +{ + SpaceOops *soops= sa->spacedata.first; + outliner_do_object_operation(soops, &soops->tree, object_delete_cb); + DAG_scene_sort(G.scene); + countall(); + BIF_undo_push("Delete Objects"); + allqueue(REDRAWALL, 0); +} + void outliner_operation_menu(ScrArea *sa) { @@ -3187,5 +3197,3 @@ void draw_outliner(ScrArea *sa, SpaceOops *soops) /* drawoopsspace handles sliders */ } - - diff --git a/source/blender/src/space.c b/source/blender/src/space.c index 1311a2e78ba..98c392b9d23 100644 --- a/source/blender/src/space.c +++ b/source/blender/src/space.c @@ -4508,6 +4508,10 @@ static void winqreadoopsspace(ScrArea *sa, void *spacedata, BWinEvent *evt) outliner_find_panel(sa, again, search_flags); } break; + case XKEY: + case DELKEY: + outliner_del(sa); + break; case WKEY: outliner_operation_menu(sa); break; |