[Bf-blender-cvs] [444934632a8] blender2.8: Workspaces: add new default workspaces in startup.blend.

Brecht Van Lommel noreply at git.blender.org
Mon Aug 20 16:29:32 CEST 2018


Commit: 444934632a8d8e239bc0c6d79a638ec0943152a6
Author: Brecht Van Lommel
Date:   Mon Aug 20 14:00:52 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB444934632a8d8e239bc0c6d79a638ec0943152a6

Workspaces: add new default workspaces in startup.blend.

===================================================================

M	release/datafiles/startup.blend
M	source/blender/blenloader/intern/versioning_defaults.c

===================================================================

diff --git a/release/datafiles/startup.blend b/release/datafiles/startup.blend
index 23bb2646a54..94574738471 100644
Binary files a/release/datafiles/startup.blend and b/release/datafiles/startup.blend differ
diff --git a/source/blender/blenloader/intern/versioning_defaults.c b/source/blender/blenloader/intern/versioning_defaults.c
index c120eed695c..5bddb81bfae 100644
--- a/source/blender/blenloader/intern/versioning_defaults.c
+++ b/source/blender/blenloader/intern/versioning_defaults.c
@@ -101,32 +101,6 @@ void BLO_update_defaults_userpref_blend(void)
 	}
 }
 
-/**
- * New workspace design: Remove all screens/workspaces except of "Default" one and rename the workspace to "General".
- * For compatibility, a new workspace has been created for each screen of old files,
- * we only want one workspace and one screen in the default startup file however.
- */
-static void update_defaults_startup_workspaces(Main *bmain)
-{
-	WorkSpace *workspace_default = NULL;
-
-	for (WorkSpace *workspace = bmain->workspaces.first, *workspace_next; workspace; workspace = workspace_next) {
-		workspace_next = workspace->id.next;
-
-		if (STREQ(workspace->id.name + 2, "Default")) {
-			/* don't rename within iterator, renaming causes listbase to be re-sorted */
-			workspace_default = workspace;
-		}
-		else {
-			BKE_workspace_remove(bmain, workspace);
-		}
-	}
-
-	/* rename "Default" workspace to "General" */
-	BKE_libblock_rename(bmain, (ID *)workspace_default, "General");
-	BLI_assert(BLI_listbase_count(BKE_workspace_layouts_get(workspace_default)) == 1);
-}
-
 /**
  * Update defaults in startup.blend, without having to save and embed the file.
  * This function can be emptied each time the startup.blend is updated. */
@@ -274,8 +248,6 @@ void BLO_update_defaults_startup_blend(Main *bmain)
 		linestyle->chain_count = 10;
 	}
 
-	update_defaults_startup_workspaces(bmain);
-
 	for (bScreen *screen = bmain->screen.first; screen; screen = screen->id.next) {
 		for (ScrArea *area = screen->areabase.first; area; area = area->next) {
 			for (SpaceLink *space_link = area->spacedata.first; space_link; space_link = space_link->next) {



More information about the Bf-blender-cvs mailing list