diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2022-01-06 15:42:45 +0300 |
---|---|---|
committer | Alexander Gavrilov <angavrilov@gmail.com> | 2022-01-06 16:43:18 +0300 |
commit | 1785286ecc908366f1c2935cfdc5287571563628 (patch) | |
tree | 8c4804e34a49458bed589a8e92fe8f74ed9017c3 /source/blender/blenloader | |
parent | 7bcf21e66e2e46042b027b4481fa9866e64fe9a1 (diff) |
Bone Overlay: support changing bone wireframe opacity.
When weight painting the bone overlay is extremely intrusive,
effectively requiring either extensive use of hiding individual
bones, or disabling the whole bone overlay between selections.
This addresses the issue by adding a bone opacity slider that
is used for the 'wireframe' armature drawing mode. It directly
controls the uniform opacity as a straightforward option.
Differential Revision: https://developer.blender.org/D11804
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/versioning_300.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_300.c b/source/blender/blenloader/intern/versioning_300.c index 5a93e81d2b1..5cfc937acf1 100644 --- a/source/blender/blenloader/intern/versioning_300.c +++ b/source/blender/blenloader/intern/versioning_300.c @@ -45,6 +45,8 @@ #include "DNA_listBase.h" #include "DNA_material_types.h" #include "DNA_modifier_types.h" +#include "DNA_screen_types.h" +#include "DNA_space_types.h" #include "DNA_text_types.h" #include "DNA_workspace_types.h" @@ -2526,5 +2528,19 @@ void blo_do_versions_300(FileData *fd, Library *UNUSED(lib), Main *bmain) } } } + + /* Initialize the bone wireframe opacity setting. */ + if (!DNA_struct_elem_find(fd->filesdna, "View3DOverlay", "float", "bone_wire_alpha")) { + 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.bone_wire_alpha = 1.0f; + } + } + } + } + } } } |