diff options
author | Simon Lenz <Amudtogal> | 2022-06-16 11:13:03 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey@blender.org> | 2022-06-22 11:45:18 +0300 |
commit | df2ab4e758c73bc72a95fcc02ac1e711bbd86b17 (patch) | |
tree | d494bf031041336e05aa7cbb4c4a2064da39f420 /source/blender/blenloader | |
parent | 5946ea938a07bf95c7682af919ee33c715e1fa42 (diff) |
Mask Editor: Add toggle for mask spline drawing
Adds an overlay option to show/hide the spline points & lines of masks in the Mask Editor.
It also moves the "smooth" option up (its position left of the selection dropdown was missleading).
{F11847272}
This emerged from a discussion in https://developer.blender.org/D12776
Differential Revision: https://developer.blender.org/D13314
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/versioning_300.c | 16 | ||||
-rw-r--r-- | source/blender/blenloader/intern/versioning_defaults.c | 2 |
2 files changed, 18 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_300.c b/source/blender/blenloader/intern/versioning_300.c index 5af42f9f1f6..eac27bc57ed 100644 --- a/source/blender/blenloader/intern/versioning_300.c +++ b/source/blender/blenloader/intern/versioning_300.c @@ -30,6 +30,7 @@ #include "DNA_gpencil_modifier_types.h" #include "DNA_lineart_types.h" #include "DNA_listBase.h" +#include "DNA_mask_types.h" #include "DNA_material_types.h" #include "DNA_mesh_types.h" #include "DNA_modifier_types.h" @@ -3096,6 +3097,21 @@ void blo_do_versions_300(FileData *fd, Library *UNUSED(lib), Main *bmain) } } + if (!MAIN_VERSION_ATLEAST(bmain, 303, 3)) { + 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.draw_flag |= MASK_DRAWFLAG_SPLINE; + } + else if (sl->spacetype == SPACE_IMAGE) { + ((SpaceImage *)sl)->mask_info.draw_flag |= MASK_DRAWFLAG_SPLINE; + } + } + } + } + } + /** * 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 91b2f509a7f..6ce53e4a648 100644 --- a/source/blender/blenloader/intern/versioning_defaults.c +++ b/source/blender/blenloader/intern/versioning_defaults.c @@ -23,6 +23,7 @@ #include "DNA_curveprofile_types.h" #include "DNA_gpencil_types.h" #include "DNA_light_types.h" +#include "DNA_mask_types.h" #include "DNA_material_types.h" #include "DNA_mesh_types.h" #include "DNA_meshdata_types.h" @@ -185,6 +186,7 @@ static void blo_update_defaults_screen(bScreen *screen, SpaceClip *sclip = area->spacedata.first; sclip->around = V3D_AROUND_CENTER_MEDIAN; sclip->mask_info.blend_factor = 0.7f; + sclip->mask_info.draw_flag = MASK_DRAWFLAG_SPLINE; } } |