diff options
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt_ops.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt_ops.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt_ops.c b/source/blender/editors/sculpt_paint/sculpt_ops.c index dc620f0ee93..f16763be735 100644 --- a/source/blender/editors/sculpt_paint/sculpt_ops.c +++ b/source/blender/editors/sculpt_paint/sculpt_ops.c @@ -84,6 +84,7 @@ #include "WM_toolsystem.h" #include "WM_types.h" +#include "ED_image.h" #include "ED_object.h" #include "ED_screen.h" #include "ED_sculpt.h" @@ -349,7 +350,7 @@ void ED_object_sculptmode_enter_ex(Main *bmain, Paint *paint = BKE_paint_get_active_from_paintmode(scene, PAINT_MODE_SCULPT); BKE_paint_init(bmain, scene, PAINT_MODE_SCULPT, PAINT_CURSOR_SCULPT); - paint_cursor_start(paint, SCULPT_mode_poll_view3d); + ED_paint_cursor_start(paint, SCULPT_mode_poll_view3d); /* Check dynamic-topology flag; re-enter dynamic-topology mode when changing modes, * As long as no data was added that is not supported. */ @@ -1060,10 +1061,8 @@ static int sculpt_mask_by_color_invoke(bContext *C, wmOperator *op, const wmEven /* Tools that are not brushes do not have the brush gizmo to update the vertex as the mouse move, * so it needs to be updated here. */ SculptCursorGeometryInfo sgi; - float mouse[2]; - mouse[0] = event->mval[0]; - mouse[1] = event->mval[1]; - SCULPT_cursor_geometry_info_update(C, &sgi, mouse, false); + const float mval_fl[2] = {UNPACK2(event->mval)}; + SCULPT_cursor_geometry_info_update(C, &sgi, mval_fl, false); SCULPT_undo_push_begin(ob, "Mask by color"); BKE_sculpt_color_layer_create_if_needed(ob); @@ -1098,7 +1097,7 @@ static void SCULPT_OT_mask_by_color(wmOperatorType *ot) /* identifiers */ ot->name = "Mask by Color"; ot->idname = "SCULPT_OT_mask_by_color"; - ot->description = "Creates a mask based on the sculpt vertex colors"; + ot->description = "Creates a mask based on the active color attribute"; /* api callbacks */ ot->invoke = sculpt_mask_by_color_invoke; |