[Bf-blender-cvs] [b59443d33f4] userpref_redesign: Use new navigation region type for UserPref navigation

Julian Eisel noreply at git.blender.org
Fri Nov 23 01:17:01 CET 2018


Commit: b59443d33f437fe061be14ce07d23b31117659c1
Author: Julian Eisel
Date:   Fri Nov 23 00:33:57 2018 +0100
Branches: userpref_redesign
https://developer.blender.org/rBb59443d33f437fe061be14ce07d23b31117659c1

Use new navigation region type for UserPref navigation

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

M	release/scripts/startup/bl_ui/space_userpref.py
M	source/blender/blenloader/intern/versioning_280.c
M	source/blender/editors/space_userpref/space_userpref.c

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

diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index 22a32d2303d..c8000610410 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -62,7 +62,7 @@ class USERPREF_HT_header(Header):
 class USERPREF_PT_navigation(Panel):
     bl_label = ""
     bl_space_type = 'USER_PREFERENCES'
-    bl_region_type = 'UI'
+    bl_region_type = 'NAVIGATION_BAR'
     bl_options = {'HIDE_HEADER'}
 
     def draw(self, context):
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c
index 5efca62f3cf..354fd9edeb2 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -2433,7 +2433,7 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
 			for (ScrArea *area = screen->areabase.first; area; area = area->next) {
 				for (SpaceLink *slink = area->spacedata.first; slink; slink = slink->next) {
 					if (slink->spacetype == SPACE_USERPREF) {
-						ARegion *navigation_region = BKE_spacedata_find_region_type(slink, area, RGN_TYPE_UI);
+						ARegion *navigation_region = BKE_spacedata_find_region_type(slink, area, RGN_TYPE_NAV_BAR);
 
 						if (!navigation_region) {
 							ListBase *regionbase = (slink == area->spacedata.first) ?
@@ -2442,7 +2442,7 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
 							navigation_region = MEM_callocN(sizeof(ARegion), "userpref navigation-region do_versions");
 
 							BLI_addhead(regionbase, navigation_region); /* order matters, addhead not addtail! */
-							navigation_region->regiontype = RGN_TYPE_UI;
+							navigation_region->regiontype = RGN_TYPE_NAV_BAR;
 							navigation_region->alignment = RGN_ALIGN_LEFT;
 						}
 					}
diff --git a/source/blender/editors/space_userpref/space_userpref.c b/source/blender/editors/space_userpref/space_userpref.c
index 7e0ee9a0e72..87da461f269 100644
--- a/source/blender/editors/space_userpref/space_userpref.c
+++ b/source/blender/editors/space_userpref/space_userpref.c
@@ -65,7 +65,7 @@ static SpaceLink *userpref_new(const ScrArea *UNUSED(area), const Scene *UNUSED(
 	ar = MEM_callocN(sizeof(ARegion), "navigation region for userpref");
 
 	BLI_addtail(&spref->regionbase, ar);
-	ar->regiontype = RGN_TYPE_UI;
+	ar->regiontype = RGN_TYPE_NAV_BAR;
 	ar->alignment = RGN_ALIGN_LEFT;
 
 	/* header */
@@ -224,7 +224,7 @@ void ED_spacetype_userpref(void)
 
 	/* regions: navigation window */
 	art = MEM_callocN(sizeof(ARegionType), "spacetype userpref region");
-	art->regionid = RGN_TYPE_UI;
+	art->regionid = RGN_TYPE_NAV_BAR;
 	art->prefsizex = UI_NAVIGATION_REGION_WIDTH;
 	art->init = userpref_navigation_region_init;
 	art->draw = userpref_navigation_region_draw;



More information about the Bf-blender-cvs mailing list