From 89eef191716cb861ae67540dcf7e80a17ac9f31e Mon Sep 17 00:00:00 2001 From: Pablo Dobarro Date: Sun, 18 Oct 2020 00:30:13 +0200 Subject: Fix T81776: Sculpt line gestures not working with transformed objects The line gesture plane should be in object space, not in world space. --- source/blender/editors/sculpt_paint/paint_mask.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'source/blender/editors/sculpt_paint/paint_mask.c') diff --git a/source/blender/editors/sculpt_paint/paint_mask.c b/source/blender/editors/sculpt_paint/paint_mask.c index 4eef43d0d03..ef22766cd0c 100644 --- a/source/blender/editors/sculpt_paint/paint_mask.c +++ b/source/blender/editors/sculpt_paint/paint_mask.c @@ -481,7 +481,11 @@ static SculptGestureContext *sculpt_gesture_init_from_line(bContext *C, wmOperat if (!sgcontext->vc.rv3d->is_persp) { mul_v3_fl(normal, -1.0f); } - plane_from_point_normal_v3(sgcontext->line.true_plane, plane_points[0], normal); + mul_v3_mat3_m4v3(normal, sgcontext->vc.obact->imat, normal); + float plane_point_object_space[3]; + mul_v3_m4v3(plane_point_object_space, sgcontext->vc.obact->imat, plane_points[0]); + plane_from_point_normal_v3(sgcontext->line.true_plane, plane_point_object_space, normal); + return sgcontext; } -- cgit v1.2.3