[Bf-blender-cvs] [7e66f0e] master: Multi-View: Set Stereo 3D operator support for EXEC calls
Dalai Felinto
noreply at git.blender.org
Fri Apr 24 18:08:34 CEST 2015
Commit: 7e66f0e9d4d6b268a626e265b6dc085f239bf6c7
Author: Dalai Felinto
Date: Fri Apr 24 13:06:04 2015 -0300
Branches: master
https://developer.blender.org/rB7e66f0e9d4d6b268a626e265b6dc085f239bf6c7
Multi-View: Set Stereo 3D operator support for EXEC calls
===================================================================
M source/blender/windowmanager/intern/wm_stereo.c
===================================================================
diff --git a/source/blender/windowmanager/intern/wm_stereo.c b/source/blender/windowmanager/intern/wm_stereo.c
index 4e13f6b..9178bd9 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;
More information about the Bf-blender-cvs
mailing list