diff options
author | Jeroen Bakker <jbakker> | 2020-10-07 17:29:15 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2020-10-07 18:15:17 +0300 |
commit | afab33e0b97cc5e5278c3e8af5490b9583c3b95c (patch) | |
tree | ad1aaabdfea64ca9b66ab7292e3f18452ed7acf3 /source/blender/blenloader | |
parent | fc767502dc7dce4ff92d239abbcc49a68fe45e02 (diff) |
UV/Image Editor: Overlay Popover
The overlay options in the image/uv editor is hidden in side panels and menus. Sometimes this panel is even hidden, while still useful.
The goal of this task is to introduce an overlay pop-over just like the overlay-popover of the 3d viewport.
Popover has
* UV Stretching (only available in the UV mode, when active object mode is a mesh and in OB_EDIT mode)
* Display As (only available in the UV mode, when active object mode is a mesh and in OB_EDIT mode)
* Show Modified (only available in the UV mode, when active object mode is a mesh and in OB_EDIT mode)
* Show UV Edges (including opacity slider; available UV, View, Paint, when active object mode is a mesh and in OB_EDIT mode)
* Udim tiles when no image is available.
Like the 3d viewport, there will be a editor toggle to enable/disable the overlays
For compatibility reasons the RNA properties are added to both the `SpaceImage.uv_editor` amd `SpaceImage.overlay`. On DNA level they are still stored in the SpaceImage. only new properties are added to the SpaceImageOverlay struct. During the next major release we could remove these options from `SpaceImage.uv_editor`. This should be noted in the Python section of release notes.
Reviewed By: Julian Eisel, Pablo Vazquez
Differential Revision: https://developer.blender.org/D8890
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/versioning_290.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_290.c b/source/blender/blenloader/intern/versioning_290.c index b9153307d70..520a5da878c 100644 --- a/source/blender/blenloader/intern/versioning_290.c +++ b/source/blender/blenloader/intern/versioning_290.c @@ -806,5 +806,19 @@ void blo_do_versions_290(FileData *fd, Library *UNUSED(lib), Main *bmain) } } } + + /* UV/Image show overlay option. */ + if (!DNA_struct_find(fd->filesdna, "SpaceImageOverlay")) { + LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { + LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { + LISTBASE_FOREACH (SpaceLink *, space, &area->spacedata) { + if (space->spacetype == SPACE_IMAGE) { + SpaceImage *sima = (SpaceImage *)space; + sima->overlay.flag = SI_OVERLAY_SHOW_OVERLAYS; + } + } + } + } + } } } |