diff options
author | Pablo Dobarro <pablodp606@gmail.com> | 2020-10-18 01:30:13 +0300 |
---|---|---|
committer | Pablo Dobarro <pablodp606@gmail.com> | 2020-10-20 13:14:28 +0300 |
commit | 89eef191716cb861ae67540dcf7e80a17ac9f31e (patch) | |
tree | fbb8ae69e864133ad840696e4e581441ab42cce6 /source/blender | |
parent | 6ced026ae1547ac28c88516a0d061315aeacc913 (diff) |
Fix T81776: Sculpt line gestures not working with transformed objects
The line gesture plane should be in object space, not in world space.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_mask.c | 6 |
1 files changed, 5 insertions, 1 deletions
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; } |