diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/physics/particle_edit.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c index eba647a1b17..0e03feba340 100644 --- a/source/blender/editors/physics/particle_edit.c +++ b/source/blender/editors/physics/particle_edit.c @@ -4693,10 +4693,6 @@ static int brush_edit_init(bContext *C, wmOperator *op) BrushEdit *bedit; float min[3], max[3]; - if (!WM_toolsystem_active_tool_is_brush(C)) { - return 0; - } - /* set the 'distance factor' for grabbing (used in comb etc) */ INIT_MINMAX(min, max); PE_minmax(depsgraph, scene, view_layer, min, max); @@ -5033,6 +5029,11 @@ static void brush_edit_cancel(bContext *UNUSED(C), wmOperator *op) brush_edit_exit(op); } +static bool brush_edit_poll(bContext *C) +{ + return PE_poll_view3d(C) && WM_toolsystem_active_tool_is_brush(C); +} + void PARTICLE_OT_brush_edit(wmOperatorType *ot) { /* identifiers */ @@ -5045,7 +5046,7 @@ void PARTICLE_OT_brush_edit(wmOperatorType *ot) ot->invoke = brush_edit_invoke; ot->modal = brush_edit_modal; ot->cancel = brush_edit_cancel; - ot->poll = PE_poll_view3d; + ot->poll = brush_edit_poll; /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_BLOCKING; |