diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-05-08 15:18:09 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-05-08 16:35:04 +0300 |
commit | a48186c5d74b3d353c5c65cd4a930dd98cc9a603 (patch) | |
tree | c49fd2af2aaac151c5fd1265e414392617043253 /source/blender/editors/transform/transform_manipulator_3d.c | |
parent | 53a56b7b6c169b21df475ae94795208501581489 (diff) |
Orientation for 3D cursor
Currently set when setting the cursor location,
optionally used as an orientation type.
Intended for use by tools too.
See: D3208
Diffstat (limited to 'source/blender/editors/transform/transform_manipulator_3d.c')
-rw-r--r-- | source/blender/editors/transform/transform_manipulator_3d.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/editors/transform/transform_manipulator_3d.c b/source/blender/editors/transform/transform_manipulator_3d.c index c3c4abbda37..502cff9a243 100644 --- a/source/blender/editors/transform/transform_manipulator_3d.c +++ b/source/blender/editors/transform/transform_manipulator_3d.c @@ -669,6 +669,13 @@ int ED_transform_calc_manipulator_stats( copy_m4_m3(rv3d->twmat, mat); break; } + case V3D_MANIP_CURSOR: + { + float mat[3][3]; + quat_to_mat3(mat, ED_view3d_cursor3d_get(scene, v3d)->rotation); + copy_m4_m3(rv3d->twmat, mat); + break; + } case V3D_MANIP_CUSTOM: { TransformOrientation *custom_orientation = BKE_scene_transform_orientation_find( @@ -1083,7 +1090,7 @@ static void manipulator_prepare_mat( copy_v3_v3(rv3d->twmat[3], tbounds->center); break; case V3D_AROUND_CURSOR: - copy_v3_v3(rv3d->twmat[3], ED_view3d_cursor3d_get(scene, v3d)); + copy_v3_v3(rv3d->twmat[3], ED_view3d_cursor3d_get(scene, v3d)->location); break; } } |