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:
authorNicholas Bishop <nicholasbishop@gmail.com>2009-11-29 05:42:47 +0300
committerNicholas Bishop <nicholasbishop@gmail.com>2009-11-29 05:42:47 +0300
commit65edb6e55f11f20a552d8f9fd1375923d9854e49 (patch)
tree531331b36fb1eba2e9173b1dccc4058f36cde15e /release/scripts/ui
parent16efe1ac46fca2fafda292344a37f1f2deede2a0 (diff)
UI:
* Moved more of 3dview header to python * Fixed the layout of the ui layers template to show the correct number of buttons * Added support for layer icons (active layer, used layers)
Diffstat (limited to 'release/scripts/ui')
-rw-r--r--release/scripts/ui/space_view3d.py18
1 files changed, 13 insertions, 5 deletions
diff --git a/release/scripts/ui/space_view3d.py b/release/scripts/ui/space_view3d.py
index 8de29dc30ff..5b33fbecac2 100644
--- a/release/scripts/ui/space_view3d.py
+++ b/release/scripts/ui/space_view3d.py
@@ -27,12 +27,12 @@ class VIEW3D_HT_header(bpy.types.Header):
def draw(self, context):
layout = self.layout
- # view = context.space_data
+ view = context.space_data
mode_string = context.mode
edit_object = context.edit_object
obj = context.active_object
toolsettings = context.scene.tool_settings
-
+
row = layout.row(align=True)
row.template_header()
@@ -56,8 +56,16 @@ class VIEW3D_HT_header(bpy.types.Header):
layout.template_header_3D()
+ # Particle edit
+ if obj and obj.mode == 'PARTICLE_EDIT':
+ layout.prop(toolsettings.particle_edit, "selection_mode", text="", expand=True)
+
+ # Occlude geometry
+ if obj and view.viewport_shading in ('SOLID', 'SHADED', 'TEXTURED') and (obj.mode == 'PARTICLE_EDIT' or (obj.mode == 'EDIT' and obj.type == 'MESH')):
+ layout.prop(view, "occlude_geometry", text="")
+
# Proportional editing
- if obj.mode in ('OBJECT', 'EDIT'):
+ if obj and obj.mode in ('OBJECT', 'EDIT'):
row = layout.row(align=True)
row.prop(toolsettings, "proportional_editing", text="", icon_only=True)
if toolsettings.proportional_editing != 'DISABLED':
@@ -69,7 +77,7 @@ class VIEW3D_HT_header(bpy.types.Header):
row.prop(toolsettings, "snap_element", text="", icon_only=True)
if toolsettings.snap_element != 'INCREMENT':
row.prop(toolsettings, "snap_target", text="", icon_only=True)
- if obj.mode == 'OBJECT':
+ if obj and obj.mode == 'OBJECT':
row.prop(toolsettings, "snap_align_rotation", text="")
if toolsettings.snap_element == 'VOLUME':
row.prop(toolsettings, "snap_peel_object", text="")
@@ -83,7 +91,7 @@ class VIEW3D_HT_header(bpy.types.Header):
props.animation = True
# Pose
- if obj.mode == 'POSE':
+ if obj and obj.mode == 'POSE':
row = layout.row(align=True)
row.operator("pose.copy", text="", icon='ICON_COPYDOWN')
row.operator("pose.paste", text="", icon='ICON_PASTEDOWN')