diff options
author | Chris Blackbourn <chrisbblend@gmail.com> | 2022-10-12 01:26:14 +0300 |
---|---|---|
committer | Chris Blackbourn <chrisbblend@gmail.com> | 2022-10-12 01:27:41 +0300 |
commit | b7decab07ef85aeda1be3391c2e85e3265b12091 (patch) | |
tree | 06951d5ae1ac8c58d60b35e4fc18c8672d218610 /source/blender/blenloader/intern | |
parent | c2256bf7f714bbd41388af3e184b3d84b496fbf3 (diff) |
UV: add grid shape source to the uv editor, and add new "pixel" option
This change is part of a wider set of changes to implement Grid and Pixel
snapping in the UV Editor. This particular change adds a new third option,
`pixel grid`, to the previous grid options, `dynamic grid` and `fixed grid`.
Maniphest Tasks : T78391
Differential Revision: https://developer.blender.org/D16197
Diffstat (limited to 'source/blender/blenloader/intern')
-rw-r--r-- | source/blender/blenloader/intern/versioning_280.c | 2 | ||||
-rw-r--r-- | source/blender/blenloader/intern/versioning_300.cc | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c index 061840aee7a..1a8fec49516 100644 --- a/source/blender/blenloader/intern/versioning_280.c +++ b/source/blender/blenloader/intern/versioning_280.c @@ -3379,7 +3379,7 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) SpaceImage *sima = (SpaceImage *)sl; sima->flag &= ~(SI_FLAG_UNUSED_0 | SI_FLAG_UNUSED_1 | SI_FLAG_UNUSED_3 | SI_FLAG_UNUSED_6 | SI_FLAG_UNUSED_7 | SI_FLAG_UNUSED_8 | - SI_FLAG_UNUSED_17 | SI_CUSTOM_GRID | SI_FLAG_UNUSED_23 | + SI_FLAG_UNUSED_17 | SI_FLAG_UNUSED_18 | SI_FLAG_UNUSED_23 | SI_FLAG_UNUSED_24); break; } diff --git a/source/blender/blenloader/intern/versioning_300.cc b/source/blender/blenloader/intern/versioning_300.cc index 0584dd6b059..5328107e1f2 100644 --- a/source/blender/blenloader/intern/versioning_300.cc +++ b/source/blender/blenloader/intern/versioning_300.cc @@ -3604,6 +3604,13 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) v3d->overlay.flag |= V3D_OVERLAY_VIEWER_ATTRIBUTE; v3d->overlay.viewer_attribute_opacity = 1.0f; } + if (sl->spacetype == SPACE_IMAGE) { + SpaceImage *sima = (SpaceImage *)sl; + if (sima->flag & SI_FLAG_UNUSED_18) { /* Was #SI_CUSTOM_GRID. */ + sima->grid_shape_source = SI_GRID_SHAPE_FIXED; + sima->flag &= ~SI_FLAG_UNUSED_18; + } + } } } } |