diff options
author | Jeroen Bakker <j.bakker@atmind.nl> | 2018-07-05 15:38:14 +0300 |
---|---|---|
committer | Jeroen Bakker <j.bakker@atmind.nl> | 2018-07-05 17:46:06 +0300 |
commit | f7ec70895c78900db8e7db88d3713ebb9aa62730 (patch) | |
tree | 40aed2e1ab618eb5fe829ce11d7033e2fc0e92a2 /source/blender/blenloader | |
parent | a4328a4b70f80bbb1c2e8df3b95b793dc5f6fb06 (diff) |
Overlay: enable/disable drawing of specific object types.
Added a option to the overlay popover that controls the visibility of
non-renderable objects like lamps, cameras, speakers, armatures, curves
empties and force fields.
After discussion we went for a single option with more detailed check in
the object_mode draw engine.
Differential Revision: https://developer.blender.org/D3524
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/versioning_280.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c index 3bdd4db3b94..8194648f369 100644 --- a/source/blender/blenloader/intern/versioning_280.c +++ b/source/blender/blenloader/intern/versioning_280.c @@ -1530,6 +1530,19 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) } } + if (!DNA_struct_elem_find(fd->filesdna, "View3DOverlay", "int", "visible_object_types")) { + for (bScreen *screen = bmain->screen.first; screen; screen = screen->id.next) { + for (ScrArea *sa = screen->areabase.first; sa; sa = sa->next) { + for (SpaceLink *sl = sa->spacedata.first; sl; sl = sl->next) { + if (sl->spacetype == SPACE_VIEW3D) { + View3D *v3d = (View3D *)sl; + v3d->overlay.visible_object_types = V3D_OVERLAY_VISIBLE_OBJECT_TYPES_MASK; + } + } + } + } + } + for (Scene *scene = bmain->scene.first; scene; scene = scene->id.next) { if (scene->toolsettings->manipulator_flag == 0) { scene->toolsettings->manipulator_flag = SCE_MANIP_TRANSLATE | SCE_MANIP_ROTATE | SCE_MANIP_SCALE; |