Multi-View: Set Stereo 3D operator support for EXEC calls

This commit is contained in:
Dalai Felinto 2015-04-24 13:06:04 -03:00
parent 27ac96dbae
commit 7e66f0e9d4
1 changed files with 10 additions and 5 deletions

View File

@ -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;