diff options
author | Jeroen Bakker <j.bakker@atmind.nl> | 2018-06-22 11:37:38 +0300 |
---|---|---|
committer | Jeroen Bakker <j.bakker@atmind.nl> | 2018-06-22 11:43:03 +0300 |
commit | f3501a00e249bc4a7212be1f443704066dd43482 (patch) | |
tree | b6c1c39d2a623022ae8f38d5cdb62a61202339b7 /source/blender/blenloader | |
parent | c517778a8bf9a0fc8a60541528cbfaf3ec47c679 (diff) |
PaintMode: Full Shading Boolean => Slider
There was a Full Shading bool that was shared across the WP, VP and TP
modes. This commit makes some changes:
- Replace the bool with a factor. This gives the user more control on
the visibility.
- Also draw it on top of the Material and Rendered mode so the user can
control what he needs. In certain cases you don't want to see the final
rendered material, but the actual texture.
- Removed the skipping of objects when in paint modes. As now the paint
modes are blended.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/versioning_280.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c index dd5deb0fb89..53e9ada214b 100644 --- a/source/blender/blenloader/intern/versioning_280.c +++ b/source/blender/blenloader/intern/versioning_280.c @@ -1508,4 +1508,23 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) } } + + { + if (!DNA_struct_elem_find(fd->filesdna, "View3DOverlay", "float", "texture_paint_mode_opacity")) { + 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; + float alpha = v3d->flag2 & V3D_SHOW_MODE_SHADE_OVERRIDE? 0.0f: 0.8f; + v3d->overlay.texture_paint_mode_opacity = alpha; + v3d->overlay.vertex_paint_mode_opacity = alpha; + v3d->overlay.weight_paint_mode_opacity = alpha; + } + } + } + } + } + + } } |