[Bf-blender-cvs] [fbca6aeb7c9] master: Fix T97132: Create a color attribute automatically for color filter tool instead of canceling.
Joseph Eagar
noreply at git.blender.org
Tue Apr 12 08:27:33 CEST 2022
Commit: fbca6aeb7c9393e9620a23f6d0915d5f58fb7930
Author: Joseph Eagar
Date: Mon Apr 11 23:25:56 2022 -0700
Branches: master
https://developer.blender.org/rBfbca6aeb7c9393e9620a23f6d0915d5f58fb7930
Fix T97132: Create a color attribute automatically
for color filter tool instead of canceling.
===================================================================
M source/blender/editors/sculpt_paint/sculpt_filter_color.c
===================================================================
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;
More information about the Bf-blender-cvs
mailing list