diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-06-17 22:38:10 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-06-17 22:38:10 +0300 |
commit | 49be79693c6d2e3be20b2cd0ecf81e76a7121b2f (patch) | |
tree | ec7913671e48abc263c95ef323186f3b57daead7 /source/blender/editors/mesh/editmesh_bisect.c | |
parent | 83c28ff96a5745c7f5713665890211657b45a35f (diff) |
Manipulator: use matrix instead of origin
This avoids having to use manipulator-type specific functions
to set the orientation.
And will make it simpler to access transformation from Python.
Currently the matrix is still used as an offset in places.
Also per-type orientation values still need to be removed.
Diffstat (limited to 'source/blender/editors/mesh/editmesh_bisect.c')
-rw-r--r-- | source/blender/editors/mesh/editmesh_bisect.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/mesh/editmesh_bisect.c b/source/blender/editors/mesh/editmesh_bisect.c index 8499949f589..2145af0df86 100644 --- a/source/blender/editors/mesh/editmesh_bisect.c +++ b/source/blender/editors/mesh/editmesh_bisect.c @@ -467,7 +467,7 @@ static void manipulator_bisect_prop_depth_get( RNA_property_float_get_array(op->ptr, man->data.prop_plane_co, plane_co); RNA_property_float_get_array(op->ptr, man->data.prop_plane_no, plane_no); - value[0] = dot_v3v3(plane_no, plane_co) - dot_v3v3(plane_no, mpr->origin); + value[0] = dot_v3v3(plane_no, plane_co) - dot_v3v3(plane_no, mpr->matrix[3]); } static void manipulator_bisect_prop_depth_set( @@ -484,7 +484,7 @@ static void manipulator_bisect_prop_depth_set( RNA_property_float_get_array(op->ptr, man->data.prop_plane_no, plane); normalize_v3(plane); - plane[3] = -value[0] - dot_v3v3(plane, mpr->origin); + plane[3] = -value[0] - dot_v3v3(plane, mpr->matrix[3]); /* Keep our location, may be offset simply to be inside the viewport. */ closest_to_plane_normalized_v3(plane_co, plane, plane_co); |