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:
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt.c')
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index 078baf0dfc6..16b5d770fa2 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -6607,6 +6607,7 @@ static void sculpt_update_cache_invariants(
}
copy_v2_v2(cache->mouse, cache->initial_mouse);
+ copy_v2_v2(cache->mouse_event, cache->initial_mouse);
copy_v2_v2(ups->tex_mouse, cache->initial_mouse);
/* Truly temporary data that isn't stored in properties. */
@@ -6734,8 +6735,8 @@ static void sculpt_update_brush_delta(UnifiedPaintSettings *ups, Object *ob, Bru
SculptSession *ss = ob->sculpt;
StrokeCache *cache = ss->cache;
const float mouse[2] = {
- cache->mouse[0],
- cache->mouse[1],
+ cache->mouse_event[0],
+ cache->mouse_event[1],
};
int tool = brush->sculpt_tool;
@@ -6946,6 +6947,7 @@ static void sculpt_update_cache_variants(bContext *C, Sculpt *sd, Object *ob, Po
cache->pen_flip = RNA_boolean_get(ptr, "pen_flip");
RNA_float_get_array(ptr, "mouse", cache->mouse);
+ RNA_float_get_array(ptr, "mouse_event", cache->mouse_event);
/* XXX: Use pressure value from first brush step for brushes which don't support strokes (grab,
* thumb). They depends on initial state and brush coord/pressure/etc.