Workspace: Move engines to workspace and Properties Editor cleanup
[blender.git] / source / blender / blenloader / intern / versioning_defaults.c
index 54ed29ab6fa24937dbeca6996e3830cf341d7491..925a87cb653232a7e96460e7fcd7e54d7dabd570 100644 (file)
@@ -45,6 +45,7 @@
 #include "BKE_brush.h"
 #include "BKE_library.h"
 #include "BKE_main.h"
+#include "BKE_scene.h"
 #include "BKE_workspace.h"
 
 #include "BLO_readfile.h"
@@ -103,6 +104,7 @@ static void update_defaults_startup_workspaces(Main *bmain)
                if (STREQ(workspace->id.name + 2, "Default")) {
                        /* don't rename within iterator, renaming causes listbase to be re-sorted */
                        workspace_default = workspace;
+                       BKE_viewrender_init(&workspace->view_render);
                }
                else {
                        BKE_workspace_remove(bmain, workspace);
@@ -120,7 +122,7 @@ static void update_defaults_startup_workspaces(Main *bmain)
 void BLO_update_defaults_startup_blend(Main *bmain)
 {
        for (Scene *scene = bmain->scene.first; scene; scene = scene->id.next) {
-               BLI_strncpy(scene->r.engine, RE_engine_id_BLENDER_EEVEE, sizeof(scene->r.engine));
+               BLI_strncpy(scene->view_render.engine_id, RE_engine_id_BLENDER_EEVEE, sizeof(scene->view_render.engine_id));
 
                scene->r.im_format.planes = R_IMF_PLANES_RGBA;
                scene->r.im_format.compress = 15;