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:
authorCampbell Barton <ideasman42@gmail.com>2018-04-25 08:25:08 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-04-25 08:25:08 +0300
commite944e215bf300cd1cea8698391679df1e3802a92 (patch)
treecb57136e5db361adae66a807fb83a3696f30361e /release/scripts
parent021444c827fea78ab9abcda68b5ef59af3fa6990 (diff)
UI: remove history & object tools
Add object shading menu.
Diffstat (limited to 'release/scripts')
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py12
-rw-r--r--release/scripts/startup/bl_ui/space_view3d_toolbar.py63
2 files changed, 12 insertions, 63 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index f53d9af89e4..1300f2c1350 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -1434,6 +1434,7 @@ class VIEW3D_MT_object(Menu):
layout.menu("VIEW3D_MT_mirror")
layout.menu("VIEW3D_MT_object_clear")
layout.menu("VIEW3D_MT_object_apply")
+ layout.menu("VIEW3D_MT_object_shading")
layout.separator()
@@ -1652,6 +1653,16 @@ class VIEW3D_MT_object_specials(Menu):
props = layout.operator("object.hide_render_clear_all")
+class VIEW3D_MT_object_shading(Menu):
+ # XXX, this menu is a place to store shading operator in object mode
+ bl_label = "Shading"
+
+ def draw(self, context):
+ layout = self.layout
+ layout.operator("object.shade_smooth", text="Smooth")
+ layout.operator("object.shade_flat", text="Flat")
+
+
class VIEW3D_MT_object_apply(Menu):
bl_label = "Apply"
@@ -3899,6 +3910,7 @@ classes = (
VIEW3D_MT_object_rigid_body,
VIEW3D_MT_object_clear,
VIEW3D_MT_object_specials,
+ VIEW3D_MT_object_shading,
VIEW3D_MT_object_apply,
VIEW3D_MT_object_parent,
VIEW3D_MT_object_track,
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index e7758e2c4ef..6f1ddffdb90 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -64,42 +64,6 @@ def draw_vpaint_symmetry(layout, vpaint):
col = layout.column()
col.prop(vpaint, "radial_symmetry", text="Radial")
-# ********** default tools for object-mode ****************
-
-
-class VIEW3D_PT_tools_object(View3DPanel, Panel):
- bl_category = "Tools"
- bl_context = "objectmode"
- bl_label = "Edit"
-
- def draw(self, context):
- layout = self.layout
-
- col = layout.column(align=True)
- col.operator("object.duplicate_move", text="Duplicate")
- col.operator("object.duplicate_move_linked", text="Duplicate Linked")
-
- col.operator("object.delete")
-
- obj = context.active_object
- if obj:
- obj_type = obj.type
-
- if obj_type in {'MESH', 'CURVE', 'SURFACE', 'ARMATURE'}:
- col = layout.column(align=True)
- col.operator("object.join")
-
- if obj_type in {'MESH', 'CURVE', 'SURFACE', 'ARMATURE', 'FONT', 'LATTICE'}:
- col = layout.column(align=True)
- col.operator_menu_enum("object.origin_set", "type", text="Set Origin")
-
- if obj_type in {'MESH', 'CURVE', 'SURFACE'}:
- col = layout.column(align=True)
- col.label(text="Shading:")
- row = col.row(align=True)
- row.operator("object.shade_smooth", text="Smooth")
- row.operator("object.shade_flat", text="Flat")
-
# ********** default tools for editmode_mesh ****************
@@ -1505,33 +1469,7 @@ class VIEW3D_PT_tools_grease_pencil_brushcurves(GreasePencilBrushCurvesPanel, Pa
bl_space_type = 'VIEW_3D'
-# Note: moved here so that it's always in last position in 'Tools' panels!
-class VIEW3D_PT_tools_history(View3DPanel, Panel):
- bl_category = "Tools"
- # No bl_context, we are always available!
- bl_label = "History"
- bl_options = {'DEFAULT_CLOSED'}
-
- def draw(self, context):
- layout = self.layout
- obj = context.object
-
- col = layout.column(align=True)
- row = col.row(align=True)
- row.operator("ed.undo")
- row.operator("ed.redo")
- if obj is None or obj.mode != 'SCULPT':
- # Sculpt mode does not generate an undo menu it seems...
- col.operator("ed.undo_history")
-
- col = layout.column(align=True)
- col.label(text="Repeat:")
- col.operator("screen.repeat_last")
- col.operator("screen.repeat_history", text="History...")
-
-
classes = (
- VIEW3D_PT_tools_object,
VIEW3D_PT_tools_meshedit_options,
VIEW3D_PT_tools_curveedit,
VIEW3D_PT_tools_curveedit_options_stroke,
@@ -1571,7 +1509,6 @@ classes = (
VIEW3D_PT_tools_grease_pencil_sculpt,
VIEW3D_PT_tools_grease_pencil_brush,
VIEW3D_PT_tools_grease_pencil_brushcurves,
- VIEW3D_PT_tools_history,
)
if __name__ == "__main__": # only for live edit.