From 2120c5af032831348412a2a8e6c61f82ba1b921c Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 14 Apr 2019 13:11:17 +0200 Subject: Gizmo: individual toggles for 3D view gizmos The popover for displaying gizmos now has options for empty, light & camera gizmos. Transform toggles are now checkboxes, which has the advantage that it's more obvious they can be mixed however changing from one to another now uses 3x clicks instead of a single click-drag action. We might need a faster way to switch between transform types. --- source/blender/blenloader/intern/versioning_280.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'source/blender/blenloader') diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c index 8d20cc0a820..952c3646e2e 100644 --- a/source/blender/blenloader/intern/versioning_280.c +++ b/source/blender/blenloader/intern/versioning_280.c @@ -3080,6 +3080,22 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) } } + if (!MAIN_VERSION_ATLEAST(bmain, 280, 56)) { + for (bScreen *screen = bmain->screens.first; screen; screen = screen->id.next) { + for (ScrArea *area = screen->areabase.first; area; area = area->next) { + for (SpaceLink *sl = area->spacedata.first; sl; sl = sl->next) { + if (sl->spacetype == SPACE_VIEW3D) { + View3D *v3d = (View3D *)sl; + v3d->gizmo_show_armature = V3D_GIZMO_SHOW_ARMATURE_BBONE | V3D_GIZMO_SHOW_ARMATURE_ROLL; + v3d->gizmo_show_empty = V3D_GIZMO_SHOW_EMPTY_IMAGE | V3D_GIZMO_SHOW_EMPTY_FORCE_FIELD; + v3d->gizmo_show_light = V3D_GIZMO_SHOW_LIGHT_SIZE | V3D_GIZMO_SHOW_LIGHT_LOOK_AT; + v3d->gizmo_show_camera = V3D_GIZMO_SHOW_CAMERA_LENS | V3D_GIZMO_SHOW_CAMERA_DOF_DIST; + } + } + } + } + } + { /* Versioning code until next subversion bump goes here. */ } -- cgit v1.2.3