[Bf-blender-cvs] [bf8962e442e] blender-v2.93-release: Fix sculpt mask operator crash running without a 3D view
Campbell Barton
noreply at git.blender.org
Fri Apr 30 07:09:02 CEST 2021
Commit: bf8962e442e51d76c0cdf669c3399bd0f83cd701
Author: Campbell Barton
Date: Fri Apr 30 14:22:13 2021 +1000
Branches: blender-v2.93-release
https://developer.blender.org/rBbf8962e442e51d76c0cdf669c3399bd0f83cd701
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.
===================================================================
M source/blender/editors/sculpt_paint/paint_mask.c
===================================================================
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;
More information about the Bf-blender-cvs
mailing list