diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2017-10-16 22:15:03 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2017-10-16 22:29:04 +0300 |
commit | e4f2b2be26adbb5c34231598526a270559c6e183 (patch) | |
tree | 40601b1349372904cffe619003dcc83b7011d8be /source/blender/makesdna | |
parent | e8962f90de4222d6f750d3d3478eff65490365d8 (diff) |
Workspace: Move engines to workspace and Properties Editor cleanup
Engine is not stored in WorkSpaces. That defines the "context" engine, which
is used for the entire UI.
The engine used for the poll of nodes (add node menu, new nodes when "Use Nodes")
is obtained from context.
Introduce a ViewRender struct for viewport settings that are defined for
workspaces and scene. This struct will be populated with the hand-picked
settings that can be defined per workspace as per the 2.8 design.
* use_scene_settings
* properties editor: workshop + organize context path
Use Scene Settings
==================
For viewport drawing, Workspaces have an option to use the Scene render
settings (F12) instead of the viewport settings.
This way users can quickly preview the final render settings, engine and
View Layer. This will affect all the editors in that workspace, and it will be
clearly indicated in the top-bar.
Properties Editor: Add Workspace and organize context path
==========================================================
We now have the properties of:
Scene, Scene > Layer, Scene > World, Workspace
[Scene | Workspace] > Render Layer > Object
[Scene | Workspace] > Render Layer > Object > Data
(...)
Reviewers: Campbell Barton, Julian Eisel
Differential Revision: https://developer.blender.org/D2842
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_layer_types.h | 1 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_scene_types.h | 11 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_space_types.h | 1 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_workspace_types.h | 10 |
4 files changed, 19 insertions, 4 deletions
diff --git a/source/blender/makesdna/DNA_layer_types.h b/source/blender/makesdna/DNA_layer_types.h index 7ef6e8c34dd..86931401aae 100644 --- a/source/blender/makesdna/DNA_layer_types.h +++ b/source/blender/makesdna/DNA_layer_types.h @@ -74,7 +74,6 @@ typedef struct LayerCollection { typedef struct SceneLayer { struct SceneLayer *next, *prev; char name[64]; /* MAX_NAME */ - char engine[32]; /* render engine */ short active_collection; short flag; short pad[2]; diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index d81a4625144..35d3f4470da 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -749,7 +749,7 @@ typedef struct RenderData { float unit_line_thickness; /* in pixels */ /* render engine */ - char engine[32]; + char engine[32] DNA_DEPRECATED; // XXX deprecated since 2.8 /* Cycles baking */ struct BakeData bake; @@ -773,6 +773,12 @@ typedef struct RenderData { } RenderData; /* *************************************************************** */ +/* Settings related to viewport drawing/render, only settings used by WorkSpace and Scene. */ +typedef struct ViewRender { + char engine_id[32]; +} ViewRender; + +/* *************************************************************** */ /* Render Conversion/Simplfication Settings */ /* control render convert and shading engine */ @@ -883,7 +889,6 @@ typedef struct GameData { /* Scene LoD */ short lodflag, pad2; int scehysteresis, pad5; - } GameData; #define STEREO_NOSTEREO 1 @@ -1699,6 +1704,8 @@ typedef struct Scene { IDProperty *layer_properties; /* settings to be override by workspaces */ int pad5[2]; + + ViewRender view_render; } Scene; /* **************** RENDERDATA ********************* */ diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index 68cc5c2d79e..f172737e3bd 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -182,6 +182,7 @@ typedef enum eSpaceButtons_Context { BCONTEXT_BONE_CONSTRAINT = 12, BCONTEXT_RENDER_LAYER = 13, BCONTEXT_COLLECTION = 14, + BCONTEXT_WORKSPACE = 15, /* always as last... */ BCONTEXT_TOT diff --git a/source/blender/makesdna/DNA_workspace_types.h b/source/blender/makesdna/DNA_workspace_types.h index 3805e1c0a8a..f6d5f8805a8 100644 --- a/source/blender/makesdna/DNA_workspace_types.h +++ b/source/blender/makesdna/DNA_workspace_types.h @@ -29,6 +29,7 @@ #ifndef __DNA_WORKSPACE_TYPES_H__ #define __DNA_WORKSPACE_TYPES_H__ +#include "DNA_scene_types.h" /* Same logic as DNA_DEPRECATED_ALLOW, but throws 'deprecated' * warnings if DNA_PRIVATE_WORKSPACE_ALLOW is not defined */ @@ -77,9 +78,12 @@ typedef struct WorkSpace { ListBase transform_orientations DNA_PRIVATE_WORKSPACE; int object_mode DNA_PRIVATE_WORKSPACE; /* enum ObjectMode */ - int pad; + int flags DNA_PRIVATE_WORKSPACE; /* enum eWorkSpaceFlags */ struct SceneLayer *render_layer DNA_PRIVATE_WORKSPACE; + + char engine_id[32]; /* Render Engine. */ + struct ViewRender view_render; } WorkSpace; /* internal struct, but exported for read/write */ @@ -132,4 +136,8 @@ typedef struct WorkSpaceInstanceHook { struct WorkSpaceLayout *temp_layout_store; } WorkSpaceInstanceHook; +typedef enum eWorkSpaceFlags { + WORKSPACE_USE_SCENE_SETTINGS = (1 << 0), +} eWorkSpaceFlags; + #endif /* __DNA_WORKSPACE_TYPES_H__ */ |