From f7dc6a63fb5a62eb6141fee375e30d94c1d83fa8 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 19 Dec 2018 20:51:04 +1100 Subject: Gizmo: optional custom orientations for transform This aims to resolve a conflict where some users want to keep keyboard axis setting global, even when the orientation is set to something else. Move/rotate/scale can optionally each have a separate orientation. Some UI changes will be made next. --- source/blender/makesdna/DNA_scene_types.h | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'source/blender/makesdna/DNA_scene_types.h') diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index d312566a4fd..467d70ffd81 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -1521,6 +1521,21 @@ typedef struct SceneEEVEE { /* *************************************************************** */ /* Scene ID-Block */ +typedef struct TransformOrientationSlot { + int type; + int index_custom; + char flag; + char _pad0[7]; +} TransformOrientationSlot; + +/* Indices when used in Scene.orientation. */ +enum { + SCE_ORIENT_DEFAULT = 0, + SCE_ORIENT_TRANSLATE = 1, + SCE_ORIENT_ROTATE = 2, + SCE_ORIENT_SCALE = 3, +}; + typedef struct Scene { ID id; struct AnimData *adt; /* animation data (must be immediately after id for utilities to use it) */ @@ -1561,8 +1576,8 @@ typedef struct Scene { ListBase markers; ListBase transform_spaces; - int orientation_index_custom; - int orientation_type; + /* First is the [scene, translate, rotate, scale]. */ + TransformOrientationSlot orientation_slots[4]; void *sound_scene; void *playback_handle; -- cgit v1.2.3