diff options
author | Campbell Barton <campbell@blender.org> | 2022-06-16 09:23:24 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-06-16 09:32:35 +0300 |
commit | 1064bf58c3e8fd28d55a09632046a3c008ca1f03 (patch) | |
tree | 686baeec3ad4380f9e825713b968d92d3553ee7f /source/blender/editors/sculpt_paint/sculpt_filter_color.c | |
parent | b19751bee21c6ba46b46e1286bfed56e52bfc1d2 (diff) |
Cleanup: differentiate region/screen relative coordinates
- Avoid ambiguity which caused these values to be confused, use `mval`
for region relative mouse coordinates, otherwise `event_xy`.
- Pass region relative coordinates to sample_detail_dyntopo &
sample_detail_voxel as there is no reason to use screen-space values.
- Rename invalid use of mval for screen-space coordinates.
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt_filter_color.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt_filter_color.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt_filter_color.c b/source/blender/editors/sculpt_paint/sculpt_filter_color.c index 165e87eb2cd..95c01d24c6d 100644 --- a/source/blender/editors/sculpt_paint/sculpt_filter_color.c +++ b/source/blender/editors/sculpt_paint/sculpt_filter_color.c @@ -339,11 +339,9 @@ static int sculpt_color_filter_invoke(bContext *C, wmOperator *op, const wmEvent if (use_automasking) { /* Update the active face set manually as the paint cursor is not enabled when using the Mesh * Filter Tool. */ - float mouse[2]; + float mval_fl[2] = {UNPACK2(event->mval)}; SculptCursorGeometryInfo sgi; - mouse[0] = event->mval[0]; - mouse[1] = event->mval[1]; - SCULPT_cursor_geometry_info_update(C, &sgi, mouse, false); + SCULPT_cursor_geometry_info_update(C, &sgi, mval_fl, false); } /* Disable for multires and dyntopo for now */ |