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
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-04-24 09:11:16 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-04-24 09:11:16 +0300
commitd7672ad0f7f4f4bcf3cb13c72ff19425f3be9709 (patch)
tree0f4b0ec8b3594ddc5c34f762c813a0c4147d515b /source
parent2753959ed7165a2e5b9bb5421fd6b3b744817402 (diff)
Fix tool settings showing in the top-bar
Each spaces top-bar wasn't showing it's own active tool, Remove RNA access to the workspaces tool since using it is error prone. Eventually this should be completely removed.
Diffstat (limited to 'source')
-rw-r--r--source/blender/makesrna/intern/rna_workspace.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/source/blender/makesrna/intern/rna_workspace.c b/source/blender/makesrna/intern/rna_workspace.c
index 5e4791b8b7a..6349b5206d6 100644
--- a/source/blender/makesrna/intern/rna_workspace.c
+++ b/source/blender/makesrna/intern/rna_workspace.c
@@ -158,9 +158,8 @@ const EnumPropertyItem *rna_WorkSpace_tools_mode_itemf(bContext *UNUSED(C),
PropertyRNA *UNUSED(prop),
bool *UNUSED(r_free))
{
- WorkSpace *workspace = ptr->id.data;
-
- switch (workspace->tools_space_type) {
+ bToolRef *tref = ptr->data;
+ switch (tref->space_type) {
case SPACE_VIEW3D:
return rna_enum_context_mode_items;
case SPACE_IMAGE:
@@ -372,19 +371,6 @@ static void rna_def_workspace(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Tools", "");
rna_def_workspace_tools(brna, prop);
- prop = RNA_def_property(srna, "tools_space_type", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "tools_space_type");
- RNA_def_property_enum_items(prop, rna_enum_space_type_items);
- RNA_def_property_ui_text(prop, "Active Tool Space", "");
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
-
- prop = RNA_def_property(srna, "tools_mode", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "tools_mode");
- RNA_def_property_enum_items(prop, DummyRNA_DEFAULT_items);
- RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_WorkSpace_tools_mode_itemf");
- RNA_def_property_ui_text(prop, "Active Tool Mode", "");
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
-
prop = RNA_def_property(srna, "object_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, rna_enum_workspace_object_mode_items);
RNA_def_property_ui_text(