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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2018-04-25 16:56:48 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-04-26 17:37:59 +0300
commit5876856f7bdaac74ae5b09afb5a2c81cdb4f873e (patch)
tree1a4ef16f9ea63994685008f72d3683cf7ce80425 /source/blender
parent11995c5a6ec99f6b08cc2bbb315fd237659356cc (diff)
Properties: remove redundant settings from workspaces tab.
Use render settings and active view layer will be handled elsewhere. Also change icon to not be confusing with render layers. Probably we should get rid of the workspace tab entirely and do it in the user preferences, but that's for later.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenkernel/BKE_workspace.h4
-rw-r--r--source/blender/blenkernel/intern/layer.c7
-rw-r--r--source/blender/blenkernel/intern/workspace.c16
-rw-r--r--source/blender/editors/space_buttons/buttons_context.c6
-rw-r--r--source/blender/makesdna/DNA_workspace_types.h1
-rw-r--r--source/blender/makesrna/intern/rna_space.c2
-rw-r--r--source/blender/makesrna/intern/rna_workspace.c9
7 files changed, 5 insertions, 40 deletions
diff --git a/source/blender/blenkernel/BKE_workspace.h b/source/blender/blenkernel/BKE_workspace.h
index 5dee6b8c44f..5ee15a08f9b 100644
--- a/source/blender/blenkernel/BKE_workspace.h
+++ b/source/blender/blenkernel/BKE_workspace.h
@@ -109,10 +109,6 @@ struct WorkSpaceLayout *BKE_workspace_hook_layout_for_workspace_get(
void BKE_workspace_hook_layout_for_workspace_set(
struct WorkSpaceInstanceHook *hook, struct WorkSpace *workspace, struct WorkSpaceLayout *layout) ATTR_NONNULL();
-/* flags */
-bool BKE_workspace_use_scene_settings_get(const struct WorkSpace *workspace) GETTER_ATTRS;
-void BKE_workspace_use_scene_settings_set(struct WorkSpace *workspace, bool value) SETTER_ATTRS;
-
/* Update / evaluate */
void BKE_workspace_update_tagged(struct Main *bmain,
struct WorkSpace *workspace,
diff --git a/source/blender/blenkernel/intern/layer.c b/source/blender/blenkernel/intern/layer.c
index 15585d852b9..41bdc3bb9ef 100644
--- a/source/blender/blenkernel/intern/layer.c
+++ b/source/blender/blenkernel/intern/layer.c
@@ -91,12 +91,7 @@ ViewLayer *BKE_view_layer_from_scene_get(const Scene *scene)
*/
ViewLayer *BKE_view_layer_from_workspace_get(const struct Scene *scene, const struct WorkSpace *workspace)
{
- if (BKE_workspace_use_scene_settings_get(workspace)) {
- return BKE_view_layer_from_scene_get(scene);
- }
- else {
- return BKE_workspace_view_layer_get(workspace, scene);
- }
+ return BKE_workspace_view_layer_get(workspace, scene);
}
/**
diff --git a/source/blender/blenkernel/intern/workspace.c b/source/blender/blenkernel/intern/workspace.c
index 8de62f82c1b..38378f66584 100644
--- a/source/blender/blenkernel/intern/workspace.c
+++ b/source/blender/blenkernel/intern/workspace.c
@@ -440,22 +440,6 @@ void BKE_workspace_hook_layout_for_workspace_set(
workspace_relation_ensure_updated(&workspace->hook_layout_relations, hook, layout);
}
-/* Flags */
-bool BKE_workspace_use_scene_settings_get(const WorkSpace *workspace)
-{
- return (workspace->flags & WORKSPACE_USE_SCENE_SETTINGS) != 0;
-}
-
-void BKE_workspace_use_scene_settings_set(WorkSpace *workspace, bool value)
-{
- if (value) {
- workspace->flags |= WORKSPACE_USE_SCENE_SETTINGS;
- }
- else {
- workspace->flags &= ~WORKSPACE_USE_SCENE_SETTINGS;
- }
-}
-
/* Update / evaluate */
void BKE_workspace_update_tagged(Main *bmain,
diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c
index b7ba8b5e065..e8faf794bb8 100644
--- a/source/blender/editors/space_buttons/buttons_context.c
+++ b/source/blender/editors/space_buttons/buttons_context.c
@@ -501,8 +501,6 @@ static int buttons_context_path(const bContext *C, ButsContextPath *path, int ma
memset(path, 0, sizeof(*path));
path->flag = flag;
- const bool use_scene_settings = BKE_workspace_use_scene_settings_get(workspace);
-
/* If some ID datablock is pinned, set the root pointer. */
if (sbuts->pinid) {
id = sbuts->pinid;
@@ -512,8 +510,8 @@ static int buttons_context_path(const bContext *C, ButsContextPath *path, int ma
}
/* No pinned root, use scene or workspace as initial root. */
else {
- if ((mainb != BCONTEXT_WORKSPACE) && (use_scene_settings ||
- ELEM(mainb, BCONTEXT_SCENE, BCONTEXT_RENDER, BCONTEXT_VIEW_LAYER, BCONTEXT_WORLD)))
+ if ((mainb != BCONTEXT_WORKSPACE) &&
+ ELEM(mainb, BCONTEXT_SCENE, BCONTEXT_RENDER, BCONTEXT_VIEW_LAYER, BCONTEXT_WORLD))
{
RNA_id_pointer_create(&scene->id, &path->ptr[0]);
path->len++;
diff --git a/source/blender/makesdna/DNA_workspace_types.h b/source/blender/makesdna/DNA_workspace_types.h
index baa6d0f94db..1f1c69ad083 100644
--- a/source/blender/makesdna/DNA_workspace_types.h
+++ b/source/blender/makesdna/DNA_workspace_types.h
@@ -155,7 +155,6 @@ typedef struct WorkSpaceInstanceHook {
} WorkSpaceInstanceHook;
typedef enum eWorkSpaceFlags {
- WORKSPACE_USE_SCENE_SETTINGS = (1 << 0),
WORKSPACE_USE_FILTER_BY_ORIGIN = (1 << 1),
} eWorkSpaceFlags;
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 5a4e23699b8..5d430e5d7b9 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -214,7 +214,7 @@ static const EnumPropertyItem buttons_context_items[] = {
{BCONTEXT_PARTICLE, "PARTICLES", ICON_PARTICLES, "Particles", "Particle"},
{BCONTEXT_PHYSICS, "PHYSICS", ICON_PHYSICS, "Physics", "Physics"},
{BCONTEXT_COLLECTION, "COLLECTION", ICON_COLLAPSEMENU, "Collection", "Collection"},
- {BCONTEXT_WORKSPACE, "WORKSPACE", ICON_RENDER_RESULT, "Workspace", "Workspace"},
+ {BCONTEXT_WORKSPACE, "WORKSPACE", ICON_SPLITSCREEN, "Workspace", "Workspace"},
{0, NULL, 0, NULL, NULL}
};
diff --git a/source/blender/makesrna/intern/rna_workspace.c b/source/blender/makesrna/intern/rna_workspace.c
index c48e80ad349..30670c83ba8 100644
--- a/source/blender/makesrna/intern/rna_workspace.c
+++ b/source/blender/makesrna/intern/rna_workspace.c
@@ -168,7 +168,7 @@ static void rna_def_workspace(BlenderRNA *brna)
RNA_def_struct_sdna(srna, "WorkSpace");
RNA_def_struct_ui_text(srna, "Workspace", "Workspace data-block, defining the working environment for the user");
/* TODO: real icon, just to show something */
- RNA_def_struct_ui_icon(srna, ICON_RENDER_RESULT);
+ RNA_def_struct_ui_icon(srna, ICON_SPLITSCREEN);
prop = RNA_def_property(srna, "screens", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "layouts", NULL);
@@ -204,13 +204,6 @@ static void rna_def_workspace(BlenderRNA *brna)
#endif
/* Flags */
- prop = RNA_def_property(srna, "use_scene_settings", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
- RNA_def_property_boolean_sdna(prop, NULL, "flags", WORKSPACE_USE_SCENE_SETTINGS);
- RNA_def_property_ui_text(prop, "Scene Settings",
- "Use scene settings instead of workspace settings");
- RNA_def_property_update(prop, NC_SCREEN | ND_LAYER, NULL);
-
prop = RNA_def_property(srna, "use_filter_by_owner", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", WORKSPACE_USE_FILTER_BY_ORIGIN);