diff options
author | Jesse Yurkovich <jesse.y@gmail.com> | 2022-04-09 07:40:05 +0300 |
---|---|---|
committer | Jesse Yurkovich <jesse.y@gmail.com> | 2022-04-09 07:40:05 +0300 |
commit | 92c89d7b879229ac01390da068026d0a11d864f1 (patch) | |
tree | 85e6438ad40203fe2aeffcd15e4499715425c0a0 /source/blender/blenloader | |
parent | 502d16e66788487113ba18f85f44ebd7eff6c492 (diff) |
UDIM: Move UDIM grid controls to the Overlay panel
This change moves the grid panel UI from the View tab up into the
Overlay panel.
Reasons to move to the Overlay panel include:
- Consistency with the grid options in the 3D viewport
- The grid has been drawn as an Overlay for quite some time already
Additional changes that now make sense to have:
- The grid responds to the main Overlay show/hide toggle
- Adds a toggle to show/hide the grid which is consistent with overlays in general
As before, these grid controls are only available for active UV edit
sessions.
Differential Revision: https://developer.blender.org/D11862
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/versioning_300.c | 38 |
1 files changed, 25 insertions, 13 deletions
diff --git a/source/blender/blenloader/intern/versioning_300.c b/source/blender/blenloader/intern/versioning_300.c index dd3412d6c83..95851c0e9ff 100644 --- a/source/blender/blenloader/intern/versioning_300.c +++ b/source/blender/blenloader/intern/versioning_300.c @@ -2567,9 +2567,7 @@ void blo_do_versions_300(FileData *fd, Library *UNUSED(lib), Main *bmain) } } } - } - if (!MAIN_VERSION_ATLEAST(bmain, 302, 10)) { /* While vertex-colors were experimental the smear tool became corrupt due * to bugs in the wm_toolsystem API (auto-creation of sculpt brushes * was broken). Go through and reset all smear brushes. */ @@ -2637,17 +2635,18 @@ void blo_do_versions_300(FileData *fd, Library *UNUSED(lib), Main *bmain) } } - /** - * Versioning code until next subversion bump goes here. - * - * \note Be sure to check when bumping the version: - * - "versioning_userdef.c", #blo_do_versions_userdef - * - "versioning_userdef.c", #do_versions_theme - * - * \note Keep this message at the bottom of the function. - */ - { - /* Keep this block, even when empty. */ + if (!MAIN_VERSION_ATLEAST(bmain, 302, 12)) { + /* UV/Image show background grid option. */ + 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_GRID_BACKGROUND; + } + } + } + } /* Add node storage for the merge by distance node. */ FOREACH_NODETREE_BEGIN (bmain, ntree, id) { @@ -2666,4 +2665,17 @@ void blo_do_versions_300(FileData *fd, Library *UNUSED(lib), Main *bmain) } FOREACH_NODETREE_END; } + + /** + * Versioning code until next subversion bump goes here. + * + * \note Be sure to check when bumping the version: + * - "versioning_userdef.c", #blo_do_versions_userdef + * - "versioning_userdef.c", #do_versions_theme + * + * \note Keep this message at the bottom of the function. + */ + { + /* Keep this block, even when empty. */ + } } |