diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-02-17 10:59:32 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-02-17 10:59:32 +0400 |
commit | 283ab431a50e89643eb496c934584e29e118b812 (patch) | |
tree | eed64f1d3db84ced468fa8d48c6237af0fd2b860 /release/scripts/startup | |
parent | a56eeb70247e55ac15239c70b8ade4c3567b798f (diff) |
Cleanup of 3D viewport header in painting modes:
- Hide Manipulate center points in sculpt and particle edit modes
- Hide 3D manipulators and orientation from sculpt mode
- Hide snap buttons in sculpt, weight, texture, vertex and particle painting modes
All this options weren't make sense in this modes and might only confuse user.
This will resolve issue #30180: 3D View header buttons and modes
Diffstat (limited to 'release/scripts/startup')
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d.py | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 4627a4ed6a2..f5ce73ff9bd 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -83,22 +83,23 @@ class VIEW3D_HT_header(Header): row.prop(toolsettings, "proportional_edit_falloff", text="", icon_only=True) # Snap - snap_element = toolsettings.snap_element - row = layout.row(align=True) - row.prop(toolsettings, "use_snap", text="") - row.prop(toolsettings, "snap_element", text="", icon_only=True) - if snap_element != 'INCREMENT': - row.prop(toolsettings, "snap_target", text="") - if obj: - if obj.mode == 'OBJECT': - row.prop(toolsettings, "use_snap_align_rotation", text="") - elif obj.mode == 'EDIT': - row.prop(toolsettings, "use_snap_self", text="") - - if snap_element == 'VOLUME': - row.prop(toolsettings, "use_snap_peel_object", text="") - elif snap_element == 'FACE': - row.prop(toolsettings, "use_snap_project", text="") + if obj.mode not in {'SCULPT', 'VERTEX_PAINT', 'WEIGHT_PAINT', 'TEXTURE_PAINT', 'PARTICLE_EDIT'}: + snap_element = toolsettings.snap_element + row = layout.row(align=True) + row.prop(toolsettings, "use_snap", text="") + row.prop(toolsettings, "snap_element", text="", icon_only=True) + if snap_element != 'INCREMENT': + row.prop(toolsettings, "snap_target", text="") + if obj: + if obj.mode == 'OBJECT': + row.prop(toolsettings, "use_snap_align_rotation", text="") + elif obj.mode == 'EDIT': + row.prop(toolsettings, "use_snap_self", text="") + + if snap_element == 'VOLUME': + row.prop(toolsettings, "use_snap_peel_object", text="") + elif snap_element == 'FACE': + row.prop(toolsettings, "use_snap_project", text="") # OpenGL render row = layout.row(align=True) |