Commit: 79152371c3c259fed9d1106aa8003beef28168e6
Author: Campbell Barton
Date:   Tue Jul 3 18:41:06 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB79152371c3c259fed9d1106aa8003beef28168e6

UI: add tool properties contexts

Currently unused, create for add-ons to populate.

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

M       release/scripts/startup/bl_ui/space_topbar.py
M       source/blender/editors/space_buttons/space_buttons.c

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

diff --git a/release/scripts/startup/bl_ui/space_topbar.py 
b/release/scripts/startup/bl_ui/space_topbar.py
index fef71ba6227..beb59d2c512 100644
--- a/release/scripts/startup/bl_ui/space_topbar.py
+++ b/release/scripts/startup/bl_ui/space_topbar.py
@@ -147,8 +147,14 @@ class TOPBAR_HT_lower_bar(Header):
             layout.popover_group(space_type='PROPERTIES', 
region_type='WINDOW', context=".weightpaint", category="")
         elif mode == 'PAINT_TEXTURE':
             layout.popover_group(space_type='PROPERTIES', 
region_type='WINDOW', context=".imagepaint", category="")
+        elif mode == 'EDIT_TEXT':
+            layout.popover_group(space_type='PROPERTIES', 
region_type='WINDOW', context=".text_edit", category="")
         elif mode == 'EDIT_ARMATURE':
             layout.popover_group(space_type='PROPERTIES', 
region_type='WINDOW', context=".armature_edit", category="")
+        elif mode == 'EDIT_METABALL':
+            layout.popover_group(space_type='PROPERTIES', 
region_type='WINDOW', context=".mball_edit", category="")
+        elif mode == 'EDIT_LATTICE':
+            layout.popover_group(space_type='PROPERTIES', 
region_type='WINDOW', context=".lattice_edit", category="")
         elif mode == 'EDIT_CURVE':
             layout.popover_group(space_type='PROPERTIES', 
region_type='WINDOW', context=".curve_edit", category="")
         elif mode == 'EDIT_MESH':
@@ -157,6 +163,8 @@ class TOPBAR_HT_lower_bar(Header):
             layout.popover_group(space_type='PROPERTIES', 
region_type='WINDOW', context=".posemode", category="")
         elif mode == 'PARTICLE':
             layout.popover_group(space_type='PROPERTIES', 
region_type='WINDOW', context=".particlemode", category="")
+        elif mode == 'OBJECT':
+            layout.popover_group(space_type='PROPERTIES', 
region_type='WINDOW', context=".objectmode", category="")
 
 
 class _draw_left_context_mode:
diff --git a/source/blender/editors/space_buttons/space_buttons.c 
b/source/blender/editors/space_buttons/space_buttons.c
index a951c2a8524..ba9045346c7 100644
--- a/source/blender/editors/space_buttons/space_buttons.c
+++ b/source/blender/editors/space_buttons/space_buttons.c
@@ -225,16 +225,16 @@ static void buttons_main_region_layout_tool(const 
bContext *C, SpaceButs *sbuts,
                                ARRAY_SET_ITEMS(contexts, ".curve_edit");
                                break;
                        case CTX_MODE_EDIT_TEXT:
-                               ARRAY_SET_ITEMS(contexts, ".todo");
+                               ARRAY_SET_ITEMS(contexts, ".text_edit");
                                break;
                        case CTX_MODE_EDIT_ARMATURE:
                                ARRAY_SET_ITEMS(contexts, ".armature_edit");
                                break;
                        case CTX_MODE_EDIT_METABALL:
-                               ARRAY_SET_ITEMS(contexts, ".todo");
+                               ARRAY_SET_ITEMS(contexts, ".mball_edit");
                                break;
                        case CTX_MODE_EDIT_LATTICE:
-                               ARRAY_SET_ITEMS(contexts, ".todo");
+                               ARRAY_SET_ITEMS(contexts, ".lattice_edit");
                                break;
                        case CTX_MODE_POSE:
                                ARRAY_SET_ITEMS(contexts, ".posemode");
@@ -255,7 +255,7 @@ static void buttons_main_region_layout_tool(const bContext 
*C, SpaceButs *sbuts,
                                ARRAY_SET_ITEMS(contexts, ".particlemode");
                                break;
                        case CTX_MODE_OBJECT:
-                               ARRAY_SET_ITEMS(contexts, ".todo");
+                               ARRAY_SET_ITEMS(contexts, ".objectmode");
                                break;
                }
        }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to