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 09:23:24 +0300
committerCampbell Barton <campbell@blender.org>2022-06-16 09:32:35 +0300
commit1064bf58c3e8fd28d55a09632046a3c008ca1f03 (patch)
tree686baeec3ad4380f9e825713b968d92d3553ee7f /source/blender/editors/sculpt_paint/paint_vertex.cc
parentb19751bee21c6ba46b46e1286bfed56e52bfc1d2 (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/paint_vertex.cc')
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.cc b/source/blender/editors/sculpt_paint/paint_vertex.cc
index 8b548a89502..67b60acc667 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex.cc
+++ b/source/blender/editors/sculpt_paint/paint_vertex.cc
@@ -1608,7 +1608,7 @@ static void smooth_brush_toggle_off(const bContext *C, Paint *paint, StrokeCache
/* Initialize the stroke cache invariants from operator properties */
static void vwpaint_update_cache_invariants(
- bContext *C, VPaint *vp, SculptSession *ss, wmOperator *op, const float mouse[2])
+ bContext *C, VPaint *vp, SculptSession *ss, wmOperator *op, const float mval[2])
{
StrokeCache *cache;
const Scene *scene = CTX_data_scene(C);
@@ -1629,8 +1629,8 @@ static void vwpaint_update_cache_invariants(
}
/* Initial mouse location */
- if (mouse) {
- copy_v2_v2(cache->initial_mouse, mouse);
+ if (mval) {
+ copy_v2_v2(cache->initial_mouse, mval);
}
else {
zero_v2(cache->initial_mouse);