From 14884cda1ff5677cacff7a038efa5440f5e15a5c Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 13 Apr 2019 20:36:53 +0200 Subject: Gizmo: move transform to a persistent option Based on feedback from animators, this is useful to keep as a view option (as in 2.7x). Now the transform gizmos can be enabled from the popover, the tools still work for location/scale/rotation. The transform tool has been removed. See T63518 --- source/blender/makesdna/DNA_view3d_types.h | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'source/blender/makesdna/DNA_view3d_types.h') diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h index cced70b0109..b98d70c865f 100644 --- a/source/blender/makesdna/DNA_view3d_types.h +++ b/source/blender/makesdna/DNA_view3d_types.h @@ -245,7 +245,11 @@ typedef struct View3D { float bundle_size; /** Display style for bundle. */ char bundle_drawtype; - char _pad3[2]; + + /** #V3D_GIZMO_SHOW_* */ + char gizmo_flag; + + char _pad3[1]; /** Multiview current eye - for internal use. */ char multiview_eye; @@ -288,7 +292,7 @@ typedef struct View3D { char gridflag; /** Transform gizmo info. */ - char gizmo_flag; + char gizmo_type_mask; /* actually only used to define the opacity of the grease pencil vertex in edit mode */ float vertex_opacity; @@ -545,7 +549,7 @@ enum { V3D_ORIENT_CUSTOM_MATRIX = (V3D_ORIENT_CUSTOM - 1), }; -/* View3d.mpr_flag (also) */ +/** #View3d.gizmo_flag */ enum { /** All gizmos. */ V3D_GIZMO_HIDE = (1 << 0), @@ -554,6 +558,13 @@ enum { V3D_GIZMO_HIDE_TOOL = (1 << 3), }; +/** #View3d.gizmo_type_mask */ +enum { + V3D_GIZMO_TYPE_MASK_TRANSLATE = (1 << 0), + V3D_GIZMO_TYPE_MASK_ROTATE = (1 << 1), + V3D_GIZMO_TYPE_MASK_SCALE = (1 << 2), +}; + #define RV3D_CAMZOOM_MIN -30 #define RV3D_CAMZOOM_MAX 600 -- cgit v1.2.3