diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2015-04-24 19:06:04 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2015-04-24 19:07:33 +0300 |
commit | 7e66f0e9d4d6b268a626e265b6dc085f239bf6c7 (patch) | |
tree | 9322df21277129d32c4e6866d1f54b2ee752160f | |
parent | 27ac96dbae9d6fb166776ff689bae171bd7f095b (diff) |
Multi-View: Set Stereo 3D operator support for EXEC calls
-rw-r--r-- | source/blender/windowmanager/intern/wm_stereo.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/source/blender/windowmanager/intern/wm_stereo.c b/source/blender/windowmanager/intern/wm_stereo.c index 4e13f6bc4d2..9178bd97257 100644 --- a/source/blender/windowmanager/intern/wm_stereo.c +++ b/source/blender/windowmanager/intern/wm_stereo.c @@ -451,11 +451,18 @@ int wm_stereo3d_set_exec(bContext *C, wmOperator *op) wmWindow *win = CTX_wm_window(C); const bool is_fullscreen = WM_window_is_fullscreen(win); char prev_display_mode = win->stereo3d_format->display_mode; - Stereo3dData *s3dd = op->customdata; + Stereo3dData *s3dd; - if (G.background || s3dd == NULL) + if (G.background) return OPERATOR_CANCELLED; + if (op->customdata == NULL) { + /* no invoke means we need to set the operator properties here */ + wm_stereo3d_set_init(C, op); + wm_stereo3d_set_properties(C, op); + } + + s3dd = op->customdata; *win->stereo3d_format = s3dd->stereo3d_format; if (prev_display_mode == S3D_DISPLAY_PAGEFLIP && @@ -497,9 +504,7 @@ int wm_stereo3d_set_exec(bContext *C, wmOperator *op) } } - if (op->customdata) { - MEM_freeN(op->customdata); - } + MEM_freeN(op->customdata); WM_event_add_notifier(C, NC_WINDOW, NULL); return OPERATOR_FINISHED; |