Fix T97553: SCULPT_handles_colors_report called for non-sculpt brushes

This commit is contained in:
Joseph Eagar 2022-04-25 12:26:02 -07:00
parent 296d734344
commit 38eed4ada3
Notes: blender-bot 2024-03-25 12:30:38 +01:00
Referenced by issue #97553, Regression: Sculpt Brushes not supported in Multiresolution and Dyntopo Mode
1 changed files with 3 additions and 1 deletions

View File

@ -5447,8 +5447,10 @@ static int sculpt_brush_stroke_invoke(bContext *C, wmOperator *op, const wmEvent
sculpt_brush_stroke_init(C, op);
Object *ob = CTX_data_active_object(C);
Sculpt *sd = CTX_data_tool_settings(C)->sculpt;
Brush *brush = BKE_paint_brush(&sd->paint);
if (!SCULPT_handles_colors_report(ob->sculpt, op->reports)) {
if (SCULPT_TOOL_NEEDS_COLOR(brush->sculpt_tool) && !SCULPT_handles_colors_report(ob->sculpt, op->reports)) {
return OPERATOR_CANCELLED;
}