From fbca6aeb7c9393e9620a23f6d0915d5f58fb7930 Mon Sep 17 00:00:00 2001 From: Joseph Eagar Date: Mon, 11 Apr 2022 23:25:56 -0700 Subject: Fix T97132: Create a color attribute automatically for color filter tool instead of canceling. --- source/blender/editors/sculpt_paint/sculpt_filter_color.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'source') diff --git a/source/blender/editors/sculpt_paint/sculpt_filter_color.c b/source/blender/editors/sculpt_paint/sculpt_filter_color.c index ab14a9629b1..70ae1fbdd3d 100644 --- a/source/blender/editors/sculpt_paint/sculpt_filter_color.c +++ b/source/blender/editors/sculpt_paint/sculpt_filter_color.c @@ -349,12 +349,7 @@ static int sculpt_color_filter_invoke(bContext *C, wmOperator *op, const wmEvent return OPERATOR_CANCELLED; } - if (!SCULPT_has_colors(ss)) { - return OPERATOR_CANCELLED; - } - SCULPT_undo_push_begin(ob, "color filter"); - BKE_sculpt_color_layer_create_if_needed(ob); /* CTX_data_ensure_evaluated_depsgraph should be used at the end to include the updates of @@ -386,7 +381,7 @@ void SCULPT_OT_color_filter(struct wmOperatorType *ot) /* api callbacks */ ot->invoke = sculpt_color_filter_invoke; ot->modal = sculpt_color_filter_modal; - ot->poll = SCULPT_vertex_colors_poll; + ot->poll = SCULPT_mode_poll; ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; -- cgit v1.2.3