Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-10-19 12:10:14 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-10-19 12:15:18 +0300
commit16882ca5356d5861e3266b99e9b2434e5cf49073 (patch)
tree9b52395e256e1f032f961c0798723707119e7dac /source/blender/blenloader
parent3c30d3bcbd93da4e4cded76c3fc3a30152a43cb4 (diff)
Image Space: make 'UV Edit' a separate mode
This is needed for splitting UV into its own editor, see: T54744
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/versioning_defaults.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_defaults.c b/source/blender/blenloader/intern/versioning_defaults.c
index cbe1969f711..2a454a02f42 100644
--- a/source/blender/blenloader/intern/versioning_defaults.c
+++ b/source/blender/blenloader/intern/versioning_defaults.c
@@ -102,6 +102,21 @@ void BLO_update_defaults_startup_blend(Main *bmain, const char *app_template)
BKE_workspace_tool_remove(workspace, workspace->tools.first);
}
}
+
+ {
+ /* 'UV Editing' should use UV mode. */
+ bScreen *screen = BLI_findstring(&bmain->screen, "Default.005", offsetof(ID, name) + 2);
+ for (ScrArea *sa = screen->areabase.first; sa; sa = sa->next) {
+ for (SpaceLink *sl = sa->spacedata.first; sl; sl = sl->next) {
+ if (sl->spacetype == SPACE_IMAGE) {
+ SpaceImage *sima = (SpaceImage *)sl;
+ if (sima->mode == SI_MODE_VIEW) {
+ sima->mode = SI_MODE_UV;
+ }
+ }
+ }
+ }
+ }
}
/* For 2D animation template. */