[Bf-blender-cvs] [bcf6cc1f6b5] blender2.8: Change startup defaults

Campbell Barton noreply at git.blender.org
Tue May 15 16:14:21 CEST 2018


Commit: bcf6cc1f6b5f16ec37651ff6b0964fd91a60a59b
Author: Campbell Barton
Date:   Tue May 15 14:40:01 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBbcf6cc1f6b5f16ec37651ff6b0964fd91a60a59b

Change startup defaults

- Default Lamp increased strength (10x stronger)
- 3D View & Camera Lens = 50mm
- Camera film size = 36x24mm Full Frame
- Render Size Percentage = 100%
- Render Display = New Window
- Scene Units = Metric
- Color Management View = Filmic
- Workbench Object Overlap = ON
- Headers on top for all editors, except the Timeline at the bottom
- Default Properties tab = Object Properties
- Generate UV's = ON

See T47064

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

M	source/blender/blenkernel/intern/camera.c
M	source/blender/blenkernel/intern/lamp.c
M	source/blender/blenkernel/intern/scene.c
M	source/blender/blenloader/intern/versioning_280.c
M	source/blender/blenloader/intern/versioning_defaults.c
M	source/blender/editors/object/object_add.c
M	source/blender/editors/space_buttons/space_buttons.c
M	source/blender/editors/space_clip/space_clip.c
M	source/blender/editors/space_console/space_console.c
M	source/blender/editors/space_graph/space_graph.c
M	source/blender/editors/space_image/space_image.c
M	source/blender/editors/space_info/space_info.c
M	source/blender/editors/space_nla/space_nla.c
M	source/blender/editors/space_node/space_node.c
M	source/blender/editors/space_outliner/space_outliner.c
M	source/blender/editors/space_script/space_script.c
M	source/blender/editors/space_sequencer/space_sequencer.c
M	source/blender/editors/space_text/space_text.c
M	source/blender/editors/space_userpref/space_userpref.c
M	source/blender/editors/space_view3d/space_view3d.c
M	source/blender/makesdna/DNA_camera_types.h

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

diff --git a/source/blender/blenkernel/intern/camera.c b/source/blender/blenkernel/intern/camera.c
index 2c5cdc39ebc..a60699a5c8a 100644
--- a/source/blender/blenkernel/intern/camera.c
+++ b/source/blender/blenkernel/intern/camera.c
@@ -66,7 +66,7 @@ void BKE_camera_init(Camera *cam)
 {
 	BLI_assert(MEMCMP_STRUCT_OFS_IS_ZERO(cam, id));
 
-	cam->lens = 35.0f;
+	cam->lens = 50.0f;
 	cam->sensor_x = DEFAULT_SENSOR_WIDTH;
 	cam->sensor_y = DEFAULT_SENSOR_HEIGHT;
 	cam->clipsta = 0.1f;
diff --git a/source/blender/blenkernel/intern/lamp.c b/source/blender/blenkernel/intern/lamp.c
index 83f429762d9..144f9e34c20 100644
--- a/source/blender/blenkernel/intern/lamp.c
+++ b/source/blender/blenkernel/intern/lamp.c
@@ -59,7 +59,8 @@ void BKE_lamp_init(Lamp *la)
 	BLI_assert(MEMCMP_STRUCT_OFS_IS_ZERO(la, id));
 
 	la->r = la->g = la->b = la->k = 1.0f;
-	la->haint = la->energy = 1.0f;
+	la->haint = 1.0f;
+	la->energy = 10.0f;
 	la->dist = 25.0f;
 	la->spotsize = DEG2RADF(45.0f);
 	la->spotblend = 0.15f;
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index 5fde2db0d15..2538a0c237b 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -563,7 +563,7 @@ void BKE_scene_init(Scene *sce)
 	sce->r.yasp = 1;
 	sce->r.tilex = 256;
 	sce->r.tiley = 256;
-	sce->r.size = 50;
+	sce->r.size = 100;
 
 	sce->r.im_format.planes = R_IMF_PLANES_RGBA;
 	sce->r.im_format.imtype = R_IMF_IMTYPE_PNG;
@@ -571,7 +571,7 @@ void BKE_scene_init(Scene *sce)
 	sce->r.im_format.quality = 90;
 	sce->r.im_format.compress = 15;
 
-	sce->r.displaymode = R_OUTPUT_AREA;
+	sce->r.displaymode = R_OUTPUT_WINDOW;
 	sce->r.framapto = 100;
 	sce->r.images = 100;
 	sce->r.framelen = 1.0;
@@ -687,6 +687,7 @@ void BKE_scene_init(Scene *sce)
 	sce->physics_settings.gravity[2] = -9.81f;
 	sce->physics_settings.flag = PHYS_GLOBAL_GRAVITY;
 
+	sce->unit.system = USER_UNIT_METRIC;
 	sce->unit.scale_length = 1.0f;
 
 	pset = &sce->toolsettings->particle;
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c
index 2af10d3faf6..39cd4426618 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -928,6 +928,7 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *main)
 					if (sl->spacetype == SPACE_VIEW3D) {
 						View3D *v3d = (View3D *)sl;
 						v3d->shading.light = V3D_LIGHTING_STUDIO;
+						v3d->shading.flag |= V3D_SHADING_OBJECT_OVERLAP;
 
 						/* Assume (demo) files written with 2.8 want to show
 						 * Eevee renders in the viewport. */
diff --git a/source/blender/blenloader/intern/versioning_defaults.c b/source/blender/blenloader/intern/versioning_defaults.c
index 4767ba4e734..fbc68f40a0e 100644
--- a/source/blender/blenloader/intern/versioning_defaults.c
+++ b/source/blender/blenloader/intern/versioning_defaults.c
@@ -30,8 +30,10 @@
 #include "BLI_math.h"
 #include "BLI_string.h"
 
+#include "DNA_camera_types.h"
 #include "DNA_brush_types.h"
 #include "DNA_freestyle_types.h"
+#include "DNA_lamp_types.h"
 #include "DNA_linestyle_types.h"
 #include "DNA_scene_types.h"
 #include "DNA_screen_types.h"
@@ -347,5 +349,55 @@ void BLO_update_defaults_startup_blend(Main *bmain)
 			br->flag |= BRUSH_ACCUMULATE;
 		}
 	}
+
+	/* Defaults from T54943. */
+	{
+		for (Scene *scene = bmain->scene.first; scene; scene = scene->id.next) {
+			scene->r.displaymode = R_OUTPUT_WINDOW;
+			scene->r.size = 100;
+			scene->unit.system = USER_UNIT_METRIC;
+			STRNCPY(scene->view_settings.view_transform, "Filmic");
+		}
+
+		for (bScreen *sc = bmain->screen.first; sc; sc = sc->id.next) {
+			for (ScrArea *sa = sc->areabase.first; sa; sa = sa->next) {
+				for (SpaceLink *sl = sa->spacedata.first; sl; sl = sl->next) {
+					switch (sl->spacetype) {
+						case SPACE_VIEW3D:
+						{
+							View3D *v3d = (View3D *)sl;
+							v3d->lens = 50;
+							break;
+						}
+						case SPACE_BUTS:
+						{
+							SpaceButs *sbuts = (SpaceButs *)sl;
+							sbuts->mainb = sbuts->mainbuser = BCONTEXT_OBJECT;
+							break;
+						}
+					}
+
+					ListBase *lb = (sl == sa->spacedata.first) ? &sa->regionbase : &sl->regionbase;
+					for (ARegion *ar = lb->first; ar; ar = ar->next) {
+						if (ar->regiontype == RGN_TYPE_HEADER) {
+							if (sl->spacetype != SPACE_ACTION) {
+								ar->alignment = RGN_ALIGN_TOP;
+							}
+						}
+					}
+				}
+			}
+		}
+
+		for (Camera *ca = bmain->camera.first; ca; ca = ca->id.next) {
+			ca->lens = 50;
+			ca->sensor_x = DEFAULT_SENSOR_WIDTH;
+			ca->sensor_y = DEFAULT_SENSOR_HEIGHT;
+		}
+
+		for (Lamp *la = bmain->lamp.first; la; la = la->id.next) {
+			la->energy = 10.0;
+		}
+	}
 }
 
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index b1c3c8bc59b..d9c743aaf27 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -306,7 +306,7 @@ void ED_object_add_generic_props(wmOperatorType *ot, bool do_editmode)
 
 void ED_object_add_mesh_props(wmOperatorType *ot)
 {
-	RNA_def_boolean(ot->srna, "calc_uvs", false, "Generate UVs", "Generate a default UV map");
+	RNA_def_boolean(ot->srna, "calc_uvs", true, "Generate UVs", "Generate a default UV map");
 }
 
 bool ED_object_add_generic_get_opts(bContext *C, wmOperator *op, const char view_align_axis,
diff --git a/source/blender/editors/space_buttons/space_buttons.c b/source/blender/editors/space_buttons/space_buttons.c
index d3fab82f7ff..6ad5ed40f74 100644
--- a/source/blender/editors/space_buttons/space_buttons.c
+++ b/source/blender/editors/space_buttons/space_buttons.c
@@ -61,6 +61,8 @@ static SpaceLink *buttons_new(const ScrArea *UNUSED(area), const Scene *UNUSED(s
 	sbuts->spacetype = SPACE_BUTS;
 	sbuts->align = BUT_VERTICAL;
 
+	sbuts->mainb = sbuts->mainbuser = BCONTEXT_OBJECT;
+
 	/* header */
 	ar = MEM_callocN(sizeof(ARegion), "header for buts");
 	
diff --git a/source/blender/editors/space_clip/space_clip.c b/source/blender/editors/space_clip/space_clip.c
index 77ebbd990d8..42832d24bb3 100644
--- a/source/blender/editors/space_clip/space_clip.c
+++ b/source/blender/editors/space_clip/space_clip.c
@@ -246,7 +246,7 @@ static SpaceLink *clip_new(const ScrArea *sa, const Scene *scene)
 
 	BLI_addtail(&sc->regionbase, ar);
 	ar->regiontype = RGN_TYPE_HEADER;
-	ar->alignment = RGN_ALIGN_BOTTOM;
+	ar->alignment = RGN_ALIGN_TOP;
 
 	/* tools view */
 	ar = MEM_callocN(sizeof(ARegion), "tools for clip");
diff --git a/source/blender/editors/space_console/space_console.c b/source/blender/editors/space_console/space_console.c
index c49df387707..ff5f030b5c2 100644
--- a/source/blender/editors/space_console/space_console.c
+++ b/source/blender/editors/space_console/space_console.c
@@ -67,7 +67,7 @@ static SpaceLink *console_new(const ScrArea *UNUSED(area), const Scene *UNUSED(s
 	
 	BLI_addtail(&sconsole->regionbase, ar);
 	ar->regiontype = RGN_TYPE_HEADER;
-	ar->alignment = RGN_ALIGN_BOTTOM;
+	ar->alignment = RGN_ALIGN_TOP;
 	
 	
 	/* main region */
diff --git a/source/blender/editors/space_graph/space_graph.c b/source/blender/editors/space_graph/space_graph.c
index f59d70d97c7..ff144fec778 100644
--- a/source/blender/editors/space_graph/space_graph.c
+++ b/source/blender/editors/space_graph/space_graph.c
@@ -119,7 +119,7 @@ static SpaceLink *graph_new(const ScrArea *UNUSED(sa), const Scene *scene)
 	
 	BLI_addtail(&sipo->regionbase, ar);
 	ar->regiontype = RGN_TYPE_HEADER;
-	ar->alignment = RGN_ALIGN_BOTTOM;
+	ar->alignment = RGN_ALIGN_TOP;
 	
 	/* channels */
 	ar = MEM_callocN(sizeof(ARegion), "channels region for graphedit");
diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c
index bfbf51487ad..1943cb2c00b 100644
--- a/source/blender/editors/space_image/space_image.c
+++ b/source/blender/editors/space_image/space_image.c
@@ -186,7 +186,7 @@ static SpaceLink *image_new(const ScrArea *UNUSED(area), const Scene *UNUSED(sce
 	
 	BLI_addtail(&simage->regionbase, ar);
 	ar->regiontype = RGN_TYPE_HEADER;
-	ar->alignment = RGN_ALIGN_BOTTOM;
+	ar->alignment = RGN_ALIGN_TOP;
 	
 	/* buttons/list view */
 	ar = MEM_callocN(sizeof(ARegion), "buttons for image");
diff --git a/source/blender/editors/space_info/space_info.c b/source/blender/editors/space_info/space_info.c
index 96a0a1ed3ec..f9336b45196 100644
--- a/source/blender/editors/space_info/space_info.c
+++ b/source/blender/editors/space_info/space_info.c
@@ -78,7 +78,7 @@ static SpaceLink *info_new(const ScrArea *UNUSED(area), const Scene *UNUSED(scen
 	
 	BLI_addtail(&sinfo->regionbase, ar);
 	ar->regiontype = RGN_TYPE_HEADER;
-	ar->alignment = RGN_ALIGN_BOTTOM;
+	ar->alignment = RGN_ALIGN_TOP;
 	
 	/* main region */
 	ar = MEM_callocN(sizeof(ARegion), "main region for info");
diff --git a/source/blender/editors/space_nla/space_nla.c b/source/blender/editors/space_nla/space_nla.c
index 331fae606af..222fb6d8fbd 100644
--- a/source/blender/editors/space_nla/space_nla.c
+++ b/source/blender/editors/space_nla/space_nla.c
@@ -114,7 +114,7 @@ static SpaceLink *nla_new(const ScrArea *sa, const Scene *scene)
 	
 	BLI_addtail(&snla->regionbase, ar);
 	ar->regiontype = RGN_TYPE_HEADER;
-	ar->alignment = RGN_ALIGN_BOTTOM;
+	ar->alignment = RGN_ALIGN_TOP;
 	
 	/* channel list region */
 	ar = MEM_callocN(sizeof(ARegion), "channel list for nla");
diff --git a/source/blender/editors/space_node/space_node.c b/source/blender/editors/space_node/space_node.c
index a5f96ee04d6..28598591012 100644
--- a/source/blender/editors/space_node/space_node.c
+++ b/source/blender/editors/space_node/space_node.c
@@ -317,7 +317,7 @@ static SpaceLink *node_new(const ScrArea *UNUSED(area), const Scene *UNUSED(scen
 
 	BLI_addtail(&snode->regionbase, ar);
 	ar->regiontype = RGN_TYPE_HEADER;
-	ar->alignment = RGN_ALIGN_BOTTOM;
+	ar->alignment = RGN_ALIGN_TOP;
 
 	/* buttons/list view */
 	ar = MEM_callocN(sizeof(ARegion), "buttons for node");
diff --git a/source/blender/editors/space_outliner/space_outliner.c b/source/blender/editors/space_outliner/space_outliner.c
index 557a0723cb4..72c8e0696bc 100644
--- a/source/blender/editors/space_outlin

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list