diff options
author | Jun Mizutani <jmztn> | 2020-11-13 10:07:07 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2020-11-13 10:14:56 +0300 |
commit | db7d8281c5a2a56bbc2b7c05ec7160d8819ee191 (patch) | |
tree | c92d292c100a1f2dad65c4d4e69296418fb495e1 /source/blender/blenloader | |
parent | f00ebd4dba25f1ddc728a1431a1f81dd03c17457 (diff) |
Add An Opacity Slider to Overlay Wireframe
This patch adds an opacity slider to the wireframe overlay. The previous
wireframe in dense geometry scenes could be too dark and sometimes the
user just wants an impression of the geometry during modelling.
Reviewed By: Jeroen Bakker
Differential Revision: https://developer.blender.org/D7622
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/versioning_290.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_290.c b/source/blender/blenloader/intern/versioning_290.c index fab4ce6727f..1574fe9b548 100644 --- a/source/blender/blenloader/intern/versioning_290.c +++ b/source/blender/blenloader/intern/versioning_290.c @@ -1139,5 +1139,18 @@ void blo_do_versions_290(FileData *fd, Library *UNUSED(lib), Main *bmain) */ { /* Keep this block, even when empty. */ + /* Initialize the opacity of the overlay wireframe */ + if (!DNA_struct_elem_find(fd->filesdna, "View3DOverlay", "float", "wireframe_opacity")) { + for (bScreen *screen = bmain->screens.first; screen; screen = screen->id.next) { + LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { + LISTBASE_FOREACH (SpaceLink *, sl, &area->spacedata) { + if (sl->spacetype == SPACE_VIEW3D) { + View3D *v3d = (View3D *)sl; + v3d->overlay.wireframe_opacity = 1.0f; + } + } + } + } + } } } |