Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2017-06-17 22:38:10 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-06-17 22:38:10 +0300
commit49be79693c6d2e3be20b2cd0ecf81e76a7121b2f (patch)
treeec7913671e48abc263c95ef323186f3b57daead7 /source/blender/editors/mesh
parent83c28ff96a5745c7f5713665890211657b45a35f (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')
-rw-r--r--source/blender/editors/mesh/editmesh_bisect.c4
-rw-r--r--source/blender/editors/mesh/editmesh_extrude.c4
2 files changed, 4 insertions, 4 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);
diff --git a/source/blender/editors/mesh/editmesh_extrude.c b/source/blender/editors/mesh/editmesh_extrude.c
index 42683960407..5b02bf2df8a 100644
--- a/source/blender/editors/mesh/editmesh_extrude.c
+++ b/source/blender/editors/mesh/editmesh_extrude.c
@@ -900,7 +900,7 @@ static void manipulator_spin_prop_depth_get(
RNA_property_float_get_array(op->ptr, man->data.prop_axis_co, plane_co);
RNA_property_float_get_array(op->ptr, man->data.prop_axis_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_spin_prop_depth_set(
@@ -917,7 +917,7 @@ static void manipulator_spin_prop_depth_set(
RNA_property_float_get_array(op->ptr, man->data.prop_axis_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);