[Bf-blender-cvs] [89eef191716] master: Fix T81776: Sculpt line gestures not working with transformed objects
Pablo Dobarro
noreply at git.blender.org
Tue Oct 20 12:15:03 CEST 2020
Commit: 89eef191716cb861ae67540dcf7e80a17ac9f31e
Author: Pablo Dobarro
Date: Sun Oct 18 00:30:13 2020 +0200
Branches: master
https://developer.blender.org/rB89eef191716cb861ae67540dcf7e80a17ac9f31e
Fix T81776: Sculpt line gestures not working with transformed objects
The line gesture plane should be in object space, not in world space.
===================================================================
M 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;
}
More information about the Bf-blender-cvs
mailing list