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.
This commit is contained in:
@@ -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_one_level(struct ScrArea *sa, int add);
|
||||||
extern void outliner_select(struct ScrArea *sa);
|
extern void outliner_select(struct ScrArea *sa);
|
||||||
extern void outliner_toggle_selected(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_operation_menu(struct ScrArea *sa);
|
||||||
extern void outliner_page_up_down(struct ScrArea *sa, int up);
|
extern void outliner_page_up_down(struct ScrArea *sa, int up);
|
||||||
extern void outliner_find_panel(struct ScrArea *sa, int again, int flags);
|
extern void outliner_find_panel(struct ScrArea *sa, int again, int flags);
|
||||||
|
|||||||
@@ -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)
|
void outliner_operation_menu(ScrArea *sa)
|
||||||
{
|
{
|
||||||
@@ -3187,5 +3197,3 @@ void draw_outliner(ScrArea *sa, SpaceOops *soops)
|
|||||||
|
|
||||||
/* drawoopsspace handles sliders */
|
/* drawoopsspace handles sliders */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -4508,6 +4508,10 @@ static void winqreadoopsspace(ScrArea *sa, void *spacedata, BWinEvent *evt)
|
|||||||
outliner_find_panel(sa, again, search_flags);
|
outliner_find_panel(sa, again, search_flags);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case XKEY:
|
||||||
|
case DELKEY:
|
||||||
|
outliner_del(sa);
|
||||||
|
break;
|
||||||
case WKEY:
|
case WKEY:
|
||||||
outliner_operation_menu(sa);
|
outliner_operation_menu(sa);
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user