diff options
author | Gaia Clary <gaia.clary@machinimatrix.org> | 2013-03-10 21:19:03 +0400 |
---|---|---|
committer | Gaia Clary <gaia.clary@machinimatrix.org> | 2013-03-10 21:19:03 +0400 |
commit | 98cafc953810a61c44ab37b8d27d7e12e83d0922 (patch) | |
tree | 98407b8c2ba9b05aade9d72c5f685213129aebdc /source/blender/editors/space_outliner/outliner_select.c | |
parent | 874b692e80181a7212c77e1d9c83b6e0b36be967 (diff) |
Added menu entry for recursive hierarchy selec in outliner
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_select.c')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_select.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/source/blender/editors/space_outliner/outliner_select.c b/source/blender/editors/space_outliner/outliner_select.c index 8b7486a31b7..03fc7954e3e 100644 --- a/source/blender/editors/space_outliner/outliner_select.c +++ b/source/blender/editors/space_outliner/outliner_select.c @@ -837,18 +837,15 @@ static int do_outliner_item_activate(bContext *C, Scene *scene, ARegion *ar, Spa return 0; } -/* event can enterkey, then it opens/closes */ -static int outliner_item_activate(bContext *C, wmOperator *op, wmEvent *event) +int outliner_item_do_activate(bContext *C, int x, int y, bool extend, bool recursive) { Scene *scene = CTX_data_scene(C); ARegion *ar = CTX_wm_region(C); SpaceOops *soops = CTX_wm_space_outliner(C); TreeElement *te; float fmval[2]; - bool extend = RNA_boolean_get(op->ptr, "extend"); - bool recursive = RNA_boolean_get(op->ptr, "recursive"); - UI_view2d_region_to_view(&ar->v2d, event->mval[0], event->mval[1], fmval, fmval + 1); + UI_view2d_region_to_view(&ar->v2d, x, y, fmval, fmval + 1); if (!ELEM3(soops->outlinevis, SO_DATABLOCKS, SO_USERDEF, SO_KEYMAP) && !(soops->flag & SO_HIDE_RESTRICTCOLS) && @@ -888,6 +885,16 @@ static int outliner_item_activate(bContext *C, wmOperator *op, wmEvent *event) return OPERATOR_FINISHED; } +/* event can enterkey, then it opens/closes */ +static int outliner_item_activate(bContext *C, wmOperator *op, wmEvent *event) +{ + bool extend = RNA_boolean_get(op->ptr, "extend"); + bool recursive = RNA_boolean_get(op->ptr, "recursive"); + int x = event->mval[0]; + int y = event->mval[1]; + return outliner_item_do_activate(C, x, y, extend, recursive); +} + void OUTLINER_OT_item_activate(wmOperatorType *ot) { ot->name = "Activate Item"; |