Change startup defaults
authorCampbell Barton <ideasman42@gmail.com>
Tue, 15 May 2018 12:40:01 +0000 (14:40 +0200)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 15 May 2018 14:14:16 +0000 (16:14 +0200)
- 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

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

index 2c5cdc39ebc7a6f62cafdc7955355bd8b5f99892..a60699a5c8a0564439bfbbefe85236a31e0d3936 100644 (file)
@@ -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;
index 83f429762d9055e2ca9accdeab80af3d45e8522d..144f9e34c20d9957739a49dc64bed7fded26b83e 100644 (file)
@@ -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;
index 5fde2db0d15c8f810740618ff57728bae7345a1a..2538a0c237bb240eb1aef23d051166a6d968db45 100644 (file)
@@ -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;
index 2af10d3faf6b122f5fdaf9d7b1bed87a7a43cded..39cd442661884dd9aa5a1420e5653f4faad7aaed 100644 (file)
@@ -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. */
index 4767ba4e734fef1a2e5b10e6964662ec4b74ada3..fbc68f40a0ebd7a5bca6e8ef3cab509845576eba 100644 (file)
 #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;
+               }
+       }
 }
 
index b1c3c8bc59bee04696c492d04e197259b21f08bb..d9c743aaf27e7055c792515ca55d835c9cef18b8 100644 (file)
@@ -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,
index d3fab82f7ff7800872e6ef30d443f7096da3b442..6ad5ed40f74a26b2131ffd904ffc6af66f80b968 100644 (file)
@@ -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");
        
index 77ebbd990d8af651687e57c939328a162a33644e..42832d24bb3591f1cb390eb102ee2301ae969552 100644 (file)
@@ -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");
index c49df387707286d5f52523867a3a12df8bd3552a..ff5f030b5c25fafb62a130c51d48b3ea13a13357 100644 (file)
@@ -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 */
index f59d70d97c7975c3c9ccf2646cab926362498429..ff144fec778925d86e6ab9c212010a94b82915ec 100644 (file)
@@ -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");
index bfbf51487ad6f2a0e1238822e74e62d2d9e23fd0..1943cb2c00baf7c06bc687f9829dad6aa259799b 100644 (file)
@@ -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");
index 96a0a1ed3ec9859500f9ee950876b21f69fb31c4..f9336b4519678b51dabc29571a95da65b7be9b55 100644 (file)
@@ -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");
index 331fae606af0fc8bdc784059537a97f1005d0ed1..222fb6d8fbd44f6a9d483b905c579949d49782ea 100644 (file)
@@ -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");
index a5f96ee04d6d8ef97624a197d3b1030f0f22b444..2859859101250a2685d13070d2c908f6d4d0f82d 100644 (file)
@@ -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");
index 557a0723cb498db066caf7b58238e9e29ca493d8..72c8e0696bc588297b3366d71b4cb701f6c5a446 100644 (file)
@@ -493,7 +493,7 @@ static SpaceLink *outliner_new(const ScrArea *UNUSED(area), const Scene *UNUSED(
        
        BLI_addtail(&soutliner->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 outliner");
index 767db745c33a4de0a8448184a47a2e51f0781326..0b87f9ec683e4690335896ad671dbbf411bcbe38 100644 (file)
@@ -76,7 +76,7 @@ static SpaceLink *script_new(const ScrArea *UNUSED(area), const Scene *UNUSED(sc
        
        BLI_addtail(&sscript->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 script");
index 4e78e056093cd0eacc688bcea0d380ab9d73ce46..6774a253dc374d587cc9fa8e96e50da0f0973ab9 100644 (file)
@@ -130,7 +130,7 @@ static SpaceLink *sequencer_new(const ScrArea *UNUSED(sa), const Scene *scene)
        
        BLI_addtail(&sseq->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 sequencer");
index c0324908b6030b9425d7784a16d836d7d768c736..e47a71138836e3aefe41ed1c906cd2ad78ab95f3 100644 (file)
@@ -79,7 +79,7 @@ static SpaceLink *text_new(const ScrArea *UNUSED(area), const Scene *UNUSED(scen
        
        BLI_addtail(&stext->regionbase, ar);
        ar->regiontype = RGN_TYPE_HEADER;
-       ar->alignment = RGN_ALIGN_BOTTOM;
+       ar->alignment = RGN_ALIGN_TOP;
 
        /* properties region */
        ar = MEM_callocN(sizeof(ARegion), "properties region for text");
index 8e569c3b16e39f8609e6a1c0bd6364afe139f1e6..c6eed9d9b3fb1a5ba7027ff413824a129cb94f00 100644 (file)
@@ -64,7 +64,7 @@ static SpaceLink *userpref_new(const ScrArea *UNUSED(area), const Scene *UNUSED(
 
        BLI_addtail(&spref->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 userpref");
index d6413e8bdfbac3abbaf0a4c43d4f48cc50e4e937..81a1f483611affcce3123ccf32d5c827e7179feb 100644 (file)
@@ -331,7 +331,7 @@ static SpaceLink *view3d_new(const ScrArea *UNUSED(sa), const Scene *scene)
        v3d->flag = V3D_SELECT_OUTLINE;
        v3d->flag2 = V3D_SHOW_RECONSTRUCTION | V3D_SHOW_GPENCIL;
        
-       v3d->lens = 35.0f;
+       v3d->lens = 50.0f;
        v3d->near = 0.01f;
        v3d->far = 1000.0f;
 
@@ -351,7 +351,7 @@ static SpaceLink *view3d_new(const ScrArea *UNUSED(sa), const Scene *scene)
        
        BLI_addtail(&v3d->regionbase, ar);
        ar->regiontype = RGN_TYPE_HEADER;
-       ar->alignment = RGN_ALIGN_BOTTOM;
+       ar->alignment = RGN_ALIGN_TOP;
        
        /* tool shelf */
        ar = MEM_callocN(sizeof(ARegion), "toolshelf for view3d");
index c90599bb5ccaaaae1a2970b12055ed9fc4636965..b3c568fab98ac2d8fac5f977d4754bb809190e47 100644 (file)
@@ -163,8 +163,8 @@ enum {
        CAMERA_SENSOR_FIT_VERT  = 2,
 };
 
-#define DEFAULT_SENSOR_WIDTH   32.0f
-#define DEFAULT_SENSOR_HEIGHT  18.0f
+#define DEFAULT_SENSOR_WIDTH   36.0f
+#define DEFAULT_SENSOR_HEIGHT  24.0f
 
 /* stereo->convergence_mode */
 enum {