[Bf-blender-cvs] [0217af2f990] blender2.8: UI: Bring back User Preferences entry in Editors list.

Pablo Vazquez noreply at git.blender.org
Tue Nov 27 14:19:08 CET 2018


Commit: 0217af2f9906af11096af815f986d36c84c89e68
Author: Pablo Vazquez
Date:   Tue Nov 27 14:19:00 2018 +0100
Branches: blender2.8
https://developer.blender.org/rB0217af2f9906af11096af815f986d36c84c89e68

UI: Bring back User Preferences entry in Editors list.

It's nonstandard and kind of weird, but it's nice when making keymaps, themes, quickly test things without spawning a new window.

===================================================================

M	release/scripts/startup/bl_ui/space_userpref.py
M	source/blender/makesrna/intern/rna_screen.c

===================================================================

diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index 73248a23238..b9c7d9ae818 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -33,8 +33,7 @@ class USERPREF_HT_header(Header):
     def draw(self, context):
         layout = self.layout
 
-        # No need to show type selector.
-        # layout.template_header()
+        layout.template_header()
 
         userpref = context.user_preferences
 
diff --git a/source/blender/makesrna/intern/rna_screen.c b/source/blender/makesrna/intern/rna_screen.c
index f4311f820ce..0a7c71a683e 100644
--- a/source/blender/makesrna/intern/rna_screen.c
+++ b/source/blender/makesrna/intern/rna_screen.c
@@ -153,7 +153,7 @@ static const EnumPropertyItem *rna_Area_type_itemf(bContext *UNUSED(C), PointerR
 
 	/* +1 to skip SPACE_EMPTY */
 	for (const EnumPropertyItem *item_from = rna_enum_space_type_items + 1; item_from->identifier; item_from++) {
-		if (ELEM(item_from->value, SPACE_TOPBAR, SPACE_STATUSBAR, SPACE_USERPREF)) {
+		if (ELEM(item_from->value, SPACE_TOPBAR, SPACE_STATUSBAR)) {
 			continue;
 		}
 		RNA_enum_item_add(&item, &totitem, item_from);
@@ -174,7 +174,7 @@ static int rna_Area_type_get(PointerRNA *ptr)
 
 static void rna_Area_type_set(PointerRNA *ptr, int value)
 {
-	if (ELEM(value, SPACE_TOPBAR, SPACE_STATUSBAR, SPACE_USERPREF)) {
+	if (ELEM(value, SPACE_TOPBAR, SPACE_STATUSBAR)) {
 		/* Special case: An area can not be set to show the top-bar editor (or
 		 * other global areas). However it should still be possible to identify
 		 * its type from Python. */
@@ -232,7 +232,7 @@ static const EnumPropertyItem *rna_Area_ui_type_itemf(
 
 	/* +1 to skip SPACE_EMPTY */
 	for (const EnumPropertyItem *item_from = rna_enum_space_type_items + 1; item_from->identifier; item_from++) {
-		if (ELEM(item_from->value, SPACE_TOPBAR, SPACE_STATUSBAR, SPACE_USERPREF)) {
+		if (ELEM(item_from->value, SPACE_TOPBAR, SPACE_STATUSBAR)) {
 			continue;
 		}



More information about the Bf-blender-cvs mailing list