Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Eagar <joeedh@gmail.com>2022-04-12 09:25:56 +0300
committerJoseph Eagar <joeedh@gmail.com>2022-04-12 09:25:56 +0300
commitfbca6aeb7c9393e9620a23f6d0915d5f58fb7930 (patch)
tree3de07f02209b67a9b50278e384bd1c04c5c4ffbb
parent4a3bcfa1026b0be5a87f6540e61b94241bd91e3b (diff)
Fix T97132: Create a color attribute automatically
for color filter tool instead of canceling.
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_filter_color.c7
1 files changed, 1 insertions, 6 deletions
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;