diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-12-19 12:51:04 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-12-19 12:57:51 +0300 |
commit | f7dc6a63fb5a62eb6141fee375e30d94c1d83fa8 (patch) | |
tree | cdf3a5c3d50bc893a98e52c48a7a71a9a70a7c72 /source/blender/makesdna | |
parent | 231ea39ed154b8284f45e97b10fbb699e79358c3 (diff) |
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.
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_scene_types.h | 19 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_view3d_types.h | 2 |
2 files changed, 18 insertions, 3 deletions
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; diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h index 1fc143ed71f..336dbec214b 100644 --- a/source/blender/makesdna/DNA_view3d_types.h +++ b/source/blender/makesdna/DNA_view3d_types.h @@ -514,7 +514,7 @@ enum { #define V3D_SHOW_Y (1 << 2) #define V3D_SHOW_Z (1 << 3) -/* Scene.orientation_type */ +/** #TransformOrientationSlot.type */ #define V3D_MANIP_GLOBAL 0 #define V3D_MANIP_LOCAL 1 #define V3D_MANIP_NORMAL 2 |