From 16882ca5356d5861e3266b99e9b2434e5cf49073 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 19 Oct 2018 20:10:14 +1100 Subject: Image Space: make 'UV Edit' a separate mode This is needed for splitting UV into its own editor, see: T54744 --- source/blender/blenloader/intern/versioning_defaults.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'source/blender/blenloader') 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. */ -- cgit v1.2.3