diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-06-20 11:04:43 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-06-20 11:14:04 +0300 |
commit | df2d05b203e130d1053883b0ebbab829267a10ae (patch) | |
tree | e6c4910512317e93c16297171171086d07a43a56 /source/blender/editors/space_outliner/outliner_select.c | |
parent | 9f9756ec35060e2685742cdff510136208e6352a (diff) |
Outliner: add object mode switching to RMB menu
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_select.c')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_select.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/editors/space_outliner/outliner_select.c b/source/blender/editors/space_outliner/outliner_select.c index 6a6a392e4a6..38ae0683d4b 100644 --- a/source/blender/editors/space_outliner/outliner_select.c +++ b/source/blender/editors/space_outliner/outliner_select.c @@ -155,6 +155,20 @@ static void do_outliner_activate_pose(bContext *C, ViewLayer *view_layer, Base * } } +/* For draw callback to run mode switching */ +void outliner_object_mode_toggle( + bContext *C, Scene *scene, ViewLayer *view_layer, + Base *base) +{ + Object *obact = OBACT(view_layer); + if (obact->mode & OB_MODE_EDIT) { + do_outliner_activate_obdata(C, scene, view_layer, base); + } + else if (obact->mode & OB_MODE_POSE) { + do_outliner_activate_pose(C, view_layer, base); + } +} + /* ****************************************************** */ /* Outliner Element Selection/Activation on Click */ |