diff options
author | Jeroen Bakker <j.bakker@atmind.nl> | 2018-05-22 15:12:47 +0300 |
---|---|---|
committer | Jeroen Bakker <j.bakker@atmind.nl> | 2018-05-22 15:55:50 +0300 |
commit | dfe088c5d9c819e7266e8e88fb31e92ac2ee8592 (patch) | |
tree | 893d823c1957624257c3ef128422c3fa132e9049 /source/blender/blenloader | |
parent | ff19b527e85ec5144efbd663bf9b4c338e179358 (diff) |
Workbench: SeeThrough draw option
Option to see through all meshes (transparency)
Works for OB_SOLID and OB_TEXTURED. Does not work for
V3D_SHADING_SHADOW.
TODO: Fresnel effect
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 63fe9642ee7..be0ae64faa4 100644 --- a/source/blender/blenloader/intern/versioning_280.c +++ b/source/blender/blenloader/intern/versioning_280.c @@ -1479,6 +1479,19 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *main) } } + if (!DNA_struct_elem_find(fd->filesdna, "View3DShading", "float", "see_through_transparency")) { + for (bScreen *screen = main->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->shading.see_through_transparency = 0.3f; + } + } + } + } + } + for (Scene *scene = main->scene.first; scene; scene = scene->id.next) { switch (scene->toolsettings->snap_mode) { case 0: scene->toolsettings->snap_mode = SCE_SNAP_MODE_INCREMENT; break; |