diff options
author | Jonathan Williamson <jonathan@cgcookie.com> | 2014-01-29 19:53:20 +0400 |
---|---|---|
committer | Jonathan Williamson <jonathan@cgcookie.com> | 2014-01-29 19:53:20 +0400 |
commit | 26f3df5565f1f2e110c8a2a656cb368059e2fd37 (patch) | |
tree | 763927c593d357565cd35574bb5af6845762d56e /release | |
parent | 289c5de7d8c8f346832cb55754fb82e11f8377a4 (diff) |
Update Edit Mode tabs for mesh objects
This greatly improves the mesh edit tabs after a few weeks of feedback, making the tabs more practical with less need to switch tabs often. Based on discussion on IRC and T37568.
Reviewers: campbellbarton
CC: campbellbarton, brecht
Reviewers: campbellbarton
Reviewed By: campbellbarton
CC: campbellbarton, brecht
Differential Revision: https://developer.blender.org/D269
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d_toolbar.py | 145 |
1 files changed, 84 insertions, 61 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index 0e3aecb41dc..4056be04a26 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -234,62 +234,13 @@ class VIEW3D_PT_tools_rigidbody(View3DPanel, Panel): col.label(text="Constraints:") col.operator("rigidbody.connect", text="Connect") -# Grease Pencil tools -class VIEW3D_PT_tools_greasepencil(View3DPanel, Panel): - bl_category = "Grease Pencil" - bl_label = "Grease Pencil" - - def draw(self, context): - layout = self.layout - draw_gpencil_tools(context, layout) - -class VIEW3D_PT_tools_objectmode(View3DPanel, Panel): - bl_category = "History" - bl_context = "objectmode" - bl_label = "History" - - def draw(self, context): - layout = self.layout - - col = layout.column(align=True) - row = col.row(align=True) - row.operator("ed.undo") - row.operator("ed.redo") - col.operator("ed.undo_history") - - draw_repeat_tools(context, layout) - # ********** default tools for editmode_mesh **************** -class VIEW3D_PT_tools_add_mesh_edit(View3DPanel, Panel): - bl_category = "Create" - bl_context = "mesh_edit" - bl_label = "Add Meshes" - - def draw (self, context): - layout = self.layout - - col = layout.column(align=True) - col.label(text="Primitives:") - col.operator("mesh.primitive_plane_add", text="Plane", icon="MESH_PLANE") - col.operator("mesh.primitive_cube_add", text="Cube", icon="MESH_CUBE") - col.operator("mesh.primitive_circle_add", text="Circle", icon="MESH_CIRCLE") - col.operator("mesh.primitive_uv_sphere_add", text="UV Sphere", icon="MESH_UVSPHERE") - col.operator("mesh.primitive_ico_sphere_add", text="Ico Sphere", icon="MESH_ICOSPHERE") - col.operator("mesh.primitive_cylinder_add", text="Cylinder", icon="MESH_CYLINDER") - col.operator("mesh.primitive_cone_add", text="Cone", icon="MESH_CONE") - col.operator("mesh.primitive_torus_add", text="Torus", icon="MESH_TORUS") - - col = layout.column(align=True) - col.label(text="Special:") - col.operator("mesh.primitive_grid_add", text="Grid", icon="MESH_GRID") - col.operator("mesh.primitive_monkey_add", text="Monkey", icon="MESH_MONKEY") - -class VIEW3D_PT_tools_meshedit(View3DPanel, Panel): - bl_category = "Basic" +class VIEW3D_PT_tools_transform_mesh(View3DPanel, Panel): + bl_category = "Mesh Tools" bl_context = "mesh_edit" - bl_label = "Mesh Tools" + bl_label = "Transform" def draw(self, context): layout = self.layout @@ -302,6 +253,14 @@ class VIEW3D_PT_tools_meshedit(View3DPanel, Panel): col.operator("transform.shrink_fatten", text="Shrink/Fatten") col.operator("transform.push_pull", text="Push/Pull") +class VIEW3D_PT_tools_meshedit(View3DPanel, Panel): + bl_category = "Mesh Tools" + bl_context = "mesh_edit" + bl_label = "Mesh Tools" + + def draw(self, context): + layout = self.layout + col = layout.column(align=True) col.label(text="Deform:") row = col.row(align=True) @@ -339,27 +298,66 @@ class VIEW3D_PT_tools_meshedit(View3DPanel, Panel): col.operator_menu_enum("mesh.merge", "type") col.operator("mesh.remove_doubles") + draw_repeat_tools(context, layout) + + +class VIEW3D_PT_tools_shading(View3DPanel, Panel): + bl_category = "Shading / UVs" + bl_context = "mesh_edit" + bl_label = "Shading" + + def draw(self, context): + layout = self.layout + + col = layout.column(align=True) + col.label(text="Shading:") + row = col.row(align=True) + row.operator("mesh.faces_shade_smooth", text="Smooth") + row.operator("mesh.faces_shade_flat", text="Flat") + col = layout.column(align=True) col.label(text="Normals:") col.operator("mesh.normals_make_consistent", text="Recalculate") col.operator("mesh.flip_normals", text="Flip Direction") + +class VIEW3D_PT_tools_uvs(View3DPanel, Panel): + bl_category = "Shading / UVs" + bl_context = "mesh_edit" + bl_label = "UVs" + def draw(self, context): + layout = self.layout + col = layout.column(align=True) col.label(text="UV Mapping:") col.menu("VIEW3D_MT_uv_map", text="Unwrap") col.operator("mesh.mark_seam").clear = False col.operator("mesh.mark_seam", text="Clear Seam").clear = True - col = layout.column(align=True) - col.label(text="Shading:") - row = col.row(align=True) - row.operator("mesh.faces_shade_smooth", text="Smooth") - row.operator("mesh.faces_shade_flat", text="Flat") - - draw_repeat_tools(context, layout) - - draw_gpencil_tools(context, layout) +class VIEW3D_PT_tools_add_mesh_edit(View3DPanel, Panel): + bl_category = "Create" + bl_context = "mesh_edit" + bl_label = "Add Meshes" + + def draw (self, context): + layout = self.layout + + col = layout.column(align=True) + col.label(text="Primitives:") + col.operator("mesh.primitive_plane_add", text="Plane", icon="MESH_PLANE") + col.operator("mesh.primitive_cube_add", text="Cube", icon="MESH_CUBE") + col.operator("mesh.primitive_circle_add", text="Circle", icon="MESH_CIRCLE") + col.operator("mesh.primitive_uv_sphere_add", text="UV Sphere", icon="MESH_UVSPHERE") + col.operator("mesh.primitive_ico_sphere_add", text="Ico Sphere", icon="MESH_ICOSPHERE") + col.operator("mesh.primitive_cylinder_add", text="Cylinder", icon="MESH_CYLINDER") + col.operator("mesh.primitive_cone_add", text="Cone", icon="MESH_CONE") + col.operator("mesh.primitive_torus_add", text="Torus", icon="MESH_TORUS") + + col = layout.column(align=True) + col.label(text="Special:") + col.operator("mesh.primitive_grid_add", text="Grid", icon="MESH_GRID") + col.operator("mesh.primitive_monkey_add", text="Monkey", icon="MESH_MONKEY") class VIEW3D_PT_tools_meshedit_options(View3DPanel, Panel): bl_category = "Options" @@ -1526,5 +1524,30 @@ class VIEW3D_PT_tools_particlemode(View3DPanel, Panel): sub.active = pe.use_fade_time sub.prop(pe, "fade_frames", slider=True) +# Grease Pencil tools +class VIEW3D_PT_tools_greasepencil(View3DPanel, Panel): + bl_category = "Grease Pencil" + bl_label = "Grease Pencil" + + def draw(self, context): + layout = self.layout + draw_gpencil_tools(context, layout) + +class VIEW3D_PT_tools_objectmode(View3DPanel, Panel): + bl_category = "History" + bl_context = "objectmode" + bl_label = "History" + + def draw(self, context): + layout = self.layout + + col = layout.column(align=True) + row = col.row(align=True) + row.operator("ed.undo") + row.operator("ed.redo") + col.operator("ed.undo_history") + + draw_repeat_tools(context, layout) + if __name__ == "__main__": # only for live edit. bpy.utils.register_module(__name__) |