Fix T81776: Sculpt line gestures not working with transformed objects
The line gesture plane should be in object space, not in world space.
This commit is contained in:
parent
6ced026ae1
commit
89eef19171
Notes:
blender-bot
2023-02-14 09:02:41 +01:00
Referenced by issue #81776, Sculpt: Line Project tool not working with transformed objects
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue