diff options
author | Nicholas Bishop <nicholasbishop@gmail.com> | 2009-11-29 01:35:56 +0300 |
---|---|---|
committer | Nicholas Bishop <nicholasbishop@gmail.com> | 2009-11-29 01:35:56 +0300 |
commit | 2b9cdd5ebdfc523dbea96cf536914f8ba8b8f2c7 (patch) | |
tree | eba6386887ef51f97e1d0258ea48c4014720f487 /release/scripts/ui | |
parent | c6edbe5f2bde513b04e6c1368883dc0291f015f8 (diff) |
UI:
* Started moving buttons out of the C 3dview header template and into the python UI script
Diffstat (limited to 'release/scripts/ui')
-rw-r--r-- | release/scripts/ui/space_view3d.py | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/release/scripts/ui/space_view3d.py b/release/scripts/ui/space_view3d.py index 751653db15b..72191e822ee 100644 --- a/release/scripts/ui/space_view3d.py +++ b/release/scripts/ui/space_view3d.py @@ -31,6 +31,7 @@ class VIEW3D_HT_header(bpy.types.Header): mode_string = context.mode edit_object = context.edit_object object = context.active_object + toolsettings = context.scene.tool_settings row = layout.row(align=True) row.template_header() @@ -55,6 +56,41 @@ class VIEW3D_HT_header(bpy.types.Header): layout.template_header_3D() + # Proportional editing + if object.mode in ('OBJECT', 'EDIT'): + row = layout.row(align=True) + row.prop(toolsettings, "proportional_editing", text="", icon_only=True) + if toolsettings.proportional_editing != 'DISABLED': + row.prop(toolsettings, "proportional_editing_falloff", text="", icon_only=True) + + # Snap + row = layout.row(align=True) + row.prop(toolsettings, "snap", text="") + row.prop(toolsettings, "snap_element", text="", icon_only=True) + if toolsettings.snap_element != 'INCREMENT': + row.prop(toolsettings, "snap_target", text="", icon_only=True) + if object.mode == 'OBJECT': + row.prop(toolsettings, "snap_align_rotation", text="") + if toolsettings.snap_element == 'VOLUME': + row.prop(toolsettings, "snap_peel_object", text="") + elif toolsettings.snap_element == 'FACE': + row.prop(toolsettings, "snap_project", text="") + + # OpenGL render + row = layout.row(align=True) + row.operator("screen.opengl_render", text="", icon='ICON_RENDER_STILL') + props = row.operator("screen.opengl_render", text="", icon='ICON_RENDER_ANIMATION') + props.animation = True + + # Pose + if object.mode == 'POSE': + row = layout.row(align=True) + row.operator("pose.copy", text="", icon='ICON_COPYDOWN') + row.operator("pose.paste", text="", icon='ICON_PASTEDOWN') + props = row.operator("pose.paste", text="", icon='ICON_PASTEFLIPDOWN') + props.flipped = 1 + + # ********** Menu ********** # ********** Utilities ********** |