Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/screen/workspace_edit.c')
-rw-r--r--source/blender/editors/screen/workspace_edit.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/source/blender/editors/screen/workspace_edit.c b/source/blender/editors/screen/workspace_edit.c
index 00a965beae7..1c5b11c7177 100644
--- a/source/blender/editors/screen/workspace_edit.c
+++ b/source/blender/editors/screen/workspace_edit.c
@@ -38,6 +38,7 @@
#include "BKE_main.h"
#include "BKE_library.h"
#include "BKE_report.h"
+#include "BKE_scene.h"
#include "BKE_screen.h"
#include "BKE_workspace.h"
@@ -51,6 +52,8 @@
#include "ED_object.h"
#include "ED_screen.h"
+#include "MEM_guardedalloc.h"
+
#include "RNA_access.h"
#include "UI_interface.h"
@@ -68,7 +71,7 @@
* \{ */
WorkSpace *ED_workspace_add(
- Main *bmain, const char *name, SceneLayer *act_render_layer)
+ Main *bmain, const char *name, SceneLayer *act_render_layer, ViewRender *view_render)
{
WorkSpace *workspace = BKE_workspace_add(bmain, name);
@@ -77,6 +80,7 @@ WorkSpace *ED_workspace_add(
#endif
BKE_workspace_render_layer_set(workspace, act_render_layer);
+ BKE_viewrender_copy(&workspace->view_render, view_render);
return workspace;
}
@@ -215,7 +219,8 @@ WorkSpace *ED_workspace_duplicate(
ListBase *layouts_old = BKE_workspace_layouts_get(workspace_old);
WorkSpace *workspace_new = ED_workspace_add(
bmain, workspace_old->id.name + 2,
- BKE_workspace_render_layer_get(workspace_old));
+ BKE_workspace_render_layer_get(workspace_old),
+ &workspace_old->view_render);
ListBase *transform_orientations_old = BKE_workspace_transform_orientations_get(workspace_old);
ListBase *transform_orientations_new = BKE_workspace_transform_orientations_get(workspace_new);
@@ -231,7 +236,6 @@ WorkSpace *ED_workspace_duplicate(
win->workspace_hook->temp_layout_store = layout_new;
}
}
-
return workspace_new;
}