Multiview: update Set Stereo 3D menu when the selected stereo mode changes
This commit is contained in:
@@ -4855,6 +4855,7 @@ static void WM_OT_stereo3d_set(wmOperatorType *ot)
|
|||||||
ot->invoke = wm_stereo3d_set_invoke;
|
ot->invoke = wm_stereo3d_set_invoke;
|
||||||
ot->poll = WM_operator_winactive;
|
ot->poll = WM_operator_winactive;
|
||||||
ot->ui = wm_stereo3d_set_draw;
|
ot->ui = wm_stereo3d_set_draw;
|
||||||
|
ot->check = wm_stereo3d_set_check;
|
||||||
ot->cancel = wm_stereo3d_set_cancel;
|
ot->cancel = wm_stereo3d_set_cancel;
|
||||||
|
|
||||||
prop = RNA_def_enum(ot->srna, "display_mode", stereo3d_display_items, S3D_DISPLAY_ANAGLYPH, "Display Mode", "");
|
prop = RNA_def_enum(ot->srna, "display_mode", stereo3d_display_items, S3D_DISPLAY_ANAGLYPH, "Display Mode", "");
|
||||||
|
@@ -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)
|
void wm_stereo3d_set_cancel(bContext *C, wmOperator *op)
|
||||||
{
|
{
|
||||||
Stereo3dData *s3dd = op->customdata;
|
Stereo3dData *s3dd = op->customdata;
|
||||||
|
@@ -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_exec(bContext *C, wmOperator *op);
|
||||||
int wm_stereo3d_set_invoke(bContext *C, wmOperator *op, const wmEvent *event);
|
int wm_stereo3d_set_invoke(bContext *C, wmOperator *op, const wmEvent *event);
|
||||||
void wm_stereo3d_set_draw(bContext *C, wmOperator *op);
|
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);
|
void wm_stereo3d_set_cancel(bContext *C, wmOperator *op);
|
||||||
|
|
||||||
/* init operator properties */
|
/* init operator properties */
|
||||||
|
Reference in New Issue
Block a user