diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2015-04-07 21:42:44 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2015-04-07 21:43:06 +0300 |
commit | 662c2cd9105c43f2c21c511a68d45cef719ef9c9 (patch) | |
tree | 580b2c5392580be49bc81d9bbe136d22011e998d /source | |
parent | 858f54f16ed3b8109fde1655fc8f224a0058b69c (diff) |
Multiview: update Set Stereo 3D menu when the selected stereo mode changes
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/windowmanager/intern/wm_operators.c | 1 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_stereo.c | 8 | ||||
-rw-r--r-- | source/blender/windowmanager/wm.h | 1 |
3 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index 2e48c840c2c..f97e79d882d 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -4855,6 +4855,7 @@ static void WM_OT_stereo3d_set(wmOperatorType *ot) ot->invoke = wm_stereo3d_set_invoke; ot->poll = WM_operator_winactive; ot->ui = wm_stereo3d_set_draw; + ot->check = wm_stereo3d_set_check; ot->cancel = wm_stereo3d_set_cancel; prop = RNA_def_enum(ot->srna, "display_mode", stereo3d_display_items, S3D_DISPLAY_ANAGLYPH, "Display Mode", ""); diff --git a/source/blender/windowmanager/intern/wm_stereo.c b/source/blender/windowmanager/intern/wm_stereo.c index 5d7b11272c6..44d0e81e93c 100644 --- a/source/blender/windowmanager/intern/wm_stereo.c +++ b/source/blender/windowmanager/intern/wm_stereo.c @@ -519,6 +519,14 @@ void wm_stereo3d_set_draw(bContext *C, wmOperator *op) } } +bool wm_stereo3d_set_check(bContext *UNUSED(C), wmOperator *UNUSED(op)) +{ + /* the check function guarantees that the menu is updated to show the + * sub-options when an enum change (e.g., it shows the anaglyph options + * when anaglyph is on, and the interlace options when this is on */ + return true; +} + void wm_stereo3d_set_cancel(bContext *C, wmOperator *op) { Stereo3dData *s3dd = op->customdata; diff --git a/source/blender/windowmanager/wm.h b/source/blender/windowmanager/wm.h index bc777b74b51..2f06ddab1e8 100644 --- a/source/blender/windowmanager/wm.h +++ b/source/blender/windowmanager/wm.h @@ -81,6 +81,7 @@ void wm_method_draw_stereo3d(const bContext *C, wmWindow *win); int wm_stereo3d_set_exec(bContext *C, wmOperator *op); int wm_stereo3d_set_invoke(bContext *C, wmOperator *op, const wmEvent *event); void wm_stereo3d_set_draw(bContext *C, wmOperator *op); +bool wm_stereo3d_set_check(bContext *C, wmOperator *op); void wm_stereo3d_set_cancel(bContext *C, wmOperator *op); /* init operator properties */ |