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_orientations.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_orientations.c')
-rw-r--r-- | source/blender/editors/transform/transform_orientations.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c index 9e6f4847b5b..c1a2c99e26d 100644 --- a/source/blender/editors/transform/transform_orientations.c +++ b/source/blender/editors/transform/transform_orientations.c @@ -481,6 +481,13 @@ void initTransformOrientation(bContext *C, TransInfo *t) unit_m3(t->spacemtx); } break; + case V3D_MANIP_CURSOR: + { + const View3DCursor *cursor = ED_view3d_cursor3d_get(t->scene, CTX_wm_view3d(C)); + BLI_strncpy(t->spacename, IFACE_("cursor"), sizeof(t->spacename)); + quat_to_mat3(t->spacemtx, cursor->rotation); + break; + } case V3D_MANIP_CUSTOM: BLI_strncpy(t->spacename, t->custom_orientation->name, sizeof(t->spacename)); |