diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-04-30 07:22:13 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-04-30 07:22:13 +0300 |
commit | bf8962e442e51d76c0cdf669c3399bd0f83cd701 (patch) | |
tree | 043287d6a5e29a28bb38679353f9e2c6142e13bf /source/blender | |
parent | 2ed847317e7da8de86846766c54f40c5ee7cee73 (diff) |
Fix sculpt mask operator crash running without a 3D view
Add missing operator poll, depend on the 3D view for all
sculpt paint/mask operators.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_mask.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_mask.c b/source/blender/editors/sculpt_paint/paint_mask.c index 7671f69ee05..b6ae6f8bee7 100644 --- a/source/blender/editors/sculpt_paint/paint_mask.c +++ b/source/blender/editors/sculpt_paint/paint_mask.c @@ -1650,7 +1650,7 @@ void PAINT_OT_mask_lasso_gesture(wmOperatorType *ot) ot->modal = WM_gesture_lasso_modal; ot->exec = paint_mask_gesture_lasso_exec; - ot->poll = SCULPT_mode_poll; + ot->poll = SCULPT_mode_poll_view3d; ot->flag = OPTYPE_REGISTER; @@ -1671,7 +1671,7 @@ void PAINT_OT_mask_box_gesture(wmOperatorType *ot) ot->modal = WM_gesture_box_modal; ot->exec = paint_mask_gesture_box_exec; - ot->poll = SCULPT_mode_poll; + ot->poll = SCULPT_mode_poll_view3d; ot->flag = OPTYPE_REGISTER; @@ -1692,7 +1692,7 @@ void PAINT_OT_mask_line_gesture(wmOperatorType *ot) ot->modal = WM_gesture_straightline_oneshot_modal; ot->exec = paint_mask_gesture_line_exec; - ot->poll = SCULPT_mode_poll; + ot->poll = SCULPT_mode_poll_view3d; ot->flag = OPTYPE_REGISTER; @@ -1713,6 +1713,8 @@ void SCULPT_OT_face_set_lasso_gesture(wmOperatorType *ot) ot->modal = WM_gesture_lasso_modal; ot->exec = face_set_gesture_lasso_exec; + ot->poll = SCULPT_mode_poll_view3d; + /* Properties. */ WM_operator_properties_gesture_lasso(ot); sculpt_gesture_operator_properties(ot); @@ -1728,7 +1730,7 @@ void SCULPT_OT_face_set_box_gesture(wmOperatorType *ot) ot->modal = WM_gesture_box_modal; ot->exec = face_set_gesture_box_exec; - ot->poll = SCULPT_mode_poll; + ot->poll = SCULPT_mode_poll_view3d; ot->flag = OPTYPE_REGISTER; @@ -1747,7 +1749,7 @@ void SCULPT_OT_trim_lasso_gesture(wmOperatorType *ot) ot->modal = WM_gesture_lasso_modal; ot->exec = sculpt_trim_gesture_lasso_exec; - ot->poll = SCULPT_mode_poll; + ot->poll = SCULPT_mode_poll_view3d; ot->flag = OPTYPE_REGISTER; @@ -1768,7 +1770,7 @@ void SCULPT_OT_trim_box_gesture(wmOperatorType *ot) ot->modal = WM_gesture_box_modal; ot->exec = sculpt_trim_gesture_box_exec; - ot->poll = SCULPT_mode_poll; + ot->poll = SCULPT_mode_poll_view3d; ot->flag = OPTYPE_REGISTER; @@ -1789,7 +1791,7 @@ void SCULPT_OT_project_line_gesture(wmOperatorType *ot) ot->modal = WM_gesture_straightline_oneshot_modal; ot->exec = project_gesture_line_exec; - ot->poll = SCULPT_mode_poll; + ot->poll = SCULPT_mode_poll_view3d; ot->flag = OPTYPE_REGISTER; |