diff options
author | Simon Lenz <Amudtogal> | 2022-06-15 16:15:23 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey@blender.org> | 2022-06-20 17:04:15 +0300 |
commit | eca0c95d51a8cede2475d1c77d5f6615623bda01 (patch) | |
tree | fe61b6035c7dc067987bb58e6684319aee54b94d /source/blender/blenloader | |
parent | 72a5bb8ba98a2866709cfa1645f31771280368db (diff) |
Mask Editor: Add mask blending factor for combined overlay
This adds a new parameter to the "Combined" overlay mode of the mask editor.
The "blending factor" allows users to blend the mask exterior with the original
footage to visualise the content of the mask in a more intuitive way. The
"Alpha" overlay is unaffected by this change.
The existing "Combined" overlay is used like before (covering everything
outside the mask in black), but can be blended with the slider in the mask
overlay to look at the exterior.
This is part of an effort to make mask editing more intuitive & easy to use:
https://developer.blender.org/T93097
Differential Revision: https://developer.blender.org/D13284
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/versioning_300.c | 12 | ||||
-rw-r--r-- | source/blender/blenloader/intern/versioning_defaults.c | 1 |
2 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_300.c b/source/blender/blenloader/intern/versioning_300.c index 97b414d4b4a..5af42f9f1f6 100644 --- a/source/blender/blenloader/intern/versioning_300.c +++ b/source/blender/blenloader/intern/versioning_300.c @@ -3084,6 +3084,18 @@ void blo_do_versions_300(FileData *fd, Library *UNUSED(lib), Main *bmain) FOREACH_NODETREE_END; } + if (!MAIN_VERSION_ATLEAST(bmain, 303, 2)) { + LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { + LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { + LISTBASE_FOREACH (SpaceLink *, sl, &area->spacedata) { + if (sl->spacetype == SPACE_CLIP) { + ((SpaceClip *)sl)->mask_info.blend_factor = 1.0; + } + } + } + } + } + /** * Versioning code until next subversion bump goes here. * diff --git a/source/blender/blenloader/intern/versioning_defaults.c b/source/blender/blenloader/intern/versioning_defaults.c index f65976ee55f..91b2f509a7f 100644 --- a/source/blender/blenloader/intern/versioning_defaults.c +++ b/source/blender/blenloader/intern/versioning_defaults.c @@ -184,6 +184,7 @@ static void blo_update_defaults_screen(bScreen *screen, else if (area->spacetype == SPACE_CLIP) { SpaceClip *sclip = area->spacedata.first; sclip->around = V3D_AROUND_CENTER_MEDIAN; + sclip->mask_info.blend_factor = 0.7f; } } |