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:
authorPhilipp Oeser <info@graphics-engineer.com>2019-12-20 06:18:33 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-12-20 06:20:42 +0300
commitc0dd9908ff880534c66b3c43604b4eb6e82d43d6 (patch)
tree5281c8439685eaeb1c08cae0809a1b1a114d7cd6 /source/blender/editors/sculpt_paint
parentc3782ebf44d81b39629fcf06f91363080aab08a1 (diff)
Fix T72577: vert/weight paint 'Orbit Around' & 'Frame Selected' fail
Caused by 14acac0bb7f3
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c
index 536d93cac29..cafdd72c7cd 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex.c
+++ b/source/blender/editors/sculpt_paint/paint_vertex.c
@@ -2339,7 +2339,9 @@ static void wpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P
/* calculate pivot for rotation around seletion if needed */
/* also needed for "View Selected" on last stroke */
- paint_last_stroke_update(scene, ss->cache->true_location);
+ float loc_world[3];
+ mul_v3_m4v3(loc_world, ob->obmat, ss->cache->true_location);
+ paint_last_stroke_update(scene, loc_world);
BKE_mesh_batch_cache_dirty_tag(ob->data, BKE_MESH_BATCH_DIRTY_ALL);
@@ -3314,7 +3316,9 @@ static void vpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P
/* calculate pivot for rotation around seletion if needed */
/* also needed for "View Selected" on last stroke */
- paint_last_stroke_update(scene, ss->cache->true_location);
+ float loc_world[3];
+ mul_v3_m4v3(loc_world, ob->obmat, ss->cache->true_location);
+ paint_last_stroke_update(scene, loc_world);
ED_region_tag_redraw(vc->ar);