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:
authorCampbell Barton <ideasman42@gmail.com>2018-05-12 15:43:29 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-05-12 15:43:29 +0300
commitb4010005de36c37797f6f8416b8c3a32703e152f (patch)
treeda336ab723eb70bafb97c500b57f054e55127f12 /release/scripts/startup/bl_ui/space_topbar.py
parent570455fb83a3208d5e7653f22b0e14430a8774f0 (diff)
UI: move general mode options to right of topbar
Diffstat (limited to 'release/scripts/startup/bl_ui/space_topbar.py')
-rw-r--r--release/scripts/startup/bl_ui/space_topbar.py37
1 files changed, 27 insertions, 10 deletions
diff --git a/release/scripts/startup/bl_ui/space_topbar.py b/release/scripts/startup/bl_ui/space_topbar.py
index 61d74b99559..0b22d1baaee 100644
--- a/release/scripts/startup/bl_ui/space_topbar.py
+++ b/release/scripts/startup/bl_ui/space_topbar.py
@@ -147,36 +147,53 @@ class TOPBAR_HT_lower_bar(Header):
if draw_fn is not None:
draw_fn(context, layout)
+ # Note: general mode options should be added to 'draw_right'.
if mode == 'SCULPT':
layout.popover_group(space_type='VIEW_3D', region_type='TOOLS', context=".paint_common", category="")
- layout.popover_group(space_type='VIEW_3D', region_type='TOOLS', context=".sculpt_mode", category="")
elif mode == 'PAINT_VERTEX':
layout.popover_group(space_type='VIEW_3D', region_type='TOOLS', context=".paint_common", category="")
- layout.popover_group(space_type='VIEW_3D', region_type='TOOLS', context=".vertexpaint", category="")
elif mode == 'PAINT_WEIGHT':
layout.popover_group(space_type='VIEW_3D', region_type='TOOLS', context=".paint_common", category="")
- layout.popover_group(space_type='VIEW_3D', region_type='TOOLS', context=".weightpaint", category="")
elif mode == 'PAINT_TEXTURE':
layout.popover_group(space_type='VIEW_3D', region_type='TOOLS', context=".paint_common", category="")
- layout.popover_group(space_type='VIEW_3D', region_type='TOOLS', context=".imagepaint", category="")
-
elif mode == 'EDIT_ARMATURE':
- layout.popover_group(space_type='VIEW_3D', region_type='TOOLS', context=".armature_edit", category="")
+ pass
elif mode == 'EDIT_CURVE':
- layout.popover_group(space_type='VIEW_3D', region_type='TOOLS', context=".curve_edit", category="")
+ pass
elif mode == 'EDIT_MESH':
- layout.popover_group(space_type='VIEW_3D', region_type='TOOLS', context=".mesh_edit", category="")
-
+ pass
elif mode == 'POSE':
layout.popover_group(space_type='VIEW_3D', region_type='TOOLS', context=".posemode", category="")
elif mode == 'PARTICLE':
layout.popover_group(space_type='VIEW_3D', region_type='TOOLS', context=".paint_common", category="")
- layout.popover_group(space_type='VIEW_3D', region_type='TOOLS', context=".particlemode", category="")
def draw_right(self, context):
layout = self.layout
+ # General options, note, these _could_ display at the RHS of the draw_left callback.
+ # we just want them not to be confused with tool options.
+ mode = context.mode
+
+ if mode == 'SCULPT':
+ layout.popover_group(space_type='VIEW_3D', region_type='TOOLS', context=".sculpt_mode", category="")
+ elif mode == 'PAINT_VERTEX':
+ layout.popover_group(space_type='VIEW_3D', region_type='TOOLS', context=".vertexpaint", category="")
+ elif mode == 'PAINT_WEIGHT':
+ layout.popover_group(space_type='VIEW_3D', region_type='TOOLS', context=".weightpaint", category="")
+ elif mode == 'PAINT_TEXTURE':
+ layout.popover_group(space_type='VIEW_3D', region_type='TOOLS', context=".imagepaint", category="")
+ elif mode == 'EDIT_ARMATURE':
+ layout.popover_group(space_type='VIEW_3D', region_type='TOOLS', context=".armature_edit", category="")
+ elif mode == 'EDIT_CURVE':
+ layout.popover_group(space_type='VIEW_3D', region_type='TOOLS', context=".curve_edit", category="")
+ elif mode == 'EDIT_MESH':
+ layout.popover_group(space_type='VIEW_3D', region_type='TOOLS', context=".mesh_edit", category="")
+ elif mode == 'POSE':
+ layout.popover_group(space_type='VIEW_3D', region_type='TOOLS', context=".posemode", category="")
+ elif mode == 'PARTICLE':
+ layout.popover_group(space_type='VIEW_3D', region_type='TOOLS', context=".particlemode", category="")
+
# Command Settings (redo)
op = context.active_operator
row = layout.row()