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:
authorCampbell Barton <campbell@blender.org>2022-06-16 08:54:42 +0300
committerCampbell Barton <campbell@blender.org>2022-06-16 08:57:28 +0300
commitb19751bee21c6ba46b46e1286bfed56e52bfc1d2 (patch)
tree5b8c690d19a6fabe7c316227c5a7cc948e9e2236 /source/blender/editors/sculpt_paint/sculpt_detail.c
parent65b1b1cd349f3bd813392e76eab5b610efba7428 (diff)
Fix mouse coords for sculpt ignore background click, sample voxel detail
Both operations used screen-relative coordinates when region-relative coordinates were expected.
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt_detail.c')
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_detail.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt_detail.c b/source/blender/editors/sculpt_paint/sculpt_detail.c
index 5275c6aac8a..0f4ef41f80e 100644
--- a/source/blender/editors/sculpt_paint/sculpt_detail.c
+++ b/source/blender/editors/sculpt_paint/sculpt_detail.c
@@ -169,7 +169,7 @@ static void sample_detail_voxel(bContext *C, ViewContext *vc, int mx, int my)
SCULPT_vertex_random_access_ensure(ss);
/* Update the active vertex. */
- const float mouse[2] = {mx, my};
+ const float mouse[2] = {mx - vc->region->winrct.xmin, my - vc->region->winrct.ymin};
SCULPT_cursor_geometry_info_update(C, &sgi, mouse, false);
BKE_sculpt_update_object_for_edit(depsgraph, ob, true, false, false);