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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2009-08-19 04:55:30 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-08-19 04:55:30 +0400
commit184ac26dd0187d70985cdc49ae527a1900fce840 (patch)
tree7b946acb11e0a430b61e2f608e0308a1b18439d7 /release/ui/space_view3d.py
parente21c1dde810b3447eaa1f6a667ae027978b18d9b (diff)
2.5: Headers
* Fix header menu spacing bug, and make it consistent for all headers. * For consistency, always put menus first in the header, then any enums to switch the type of data displayed. * Node editor header ported to python layout. Still quite a few operators missing to make the menus complete. * RNA wrapped node editor, and added use_nodes property to material and scene.
Diffstat (limited to 'release/ui/space_view3d.py')
-rw-r--r--release/ui/space_view3d.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/release/ui/space_view3d.py b/release/ui/space_view3d.py
index 1a5dd6b148c..44b1c82ff46 100644
--- a/release/ui/space_view3d.py
+++ b/release/ui/space_view3d.py
@@ -13,25 +13,26 @@ class VIEW3D_HT_header(bpy.types.Header):
mode_string = context.mode
edit_object = context.edit_object
- layout.template_header()
-
+ row = layout.row(align=True)
+ row.template_header()
+
# Menus
if context.area.show_menus:
- row = layout.row()
+ sub = row.row(align=True)
- row.itemM("VIEW3D_MT_view")
+ sub.itemM("VIEW3D_MT_view")
# Select Menu
if mode_string not in ('EDIT_TEXT', 'SCULPT', 'PAINT_WEIGHT', 'PAINT_VERTEX', 'PAINT_TEXTURE', 'PARTICLE'):
# XXX: Particle Mode has Select Menu.
- row.itemM("VIEW3D_MT_select_%s" % mode_string)
+ sub.itemM("VIEW3D_MT_select_%s" % mode_string)
if mode_string == 'OBJECT':
- row.itemM("VIEW3D_MT_object")
+ sub.itemM("VIEW3D_MT_object")
elif mode_string == 'SCULPT':
- row.itemM("VIEW3D_MT_sculpt")
+ sub.itemM("VIEW3D_MT_sculpt")
elif edit_object:
- row.itemM("VIEW3D_MT_edit_%s" % edit_object.type)
+ sub.itemM("VIEW3D_MT_edit_%s" % edit_object.type)
layout.template_header_3D()