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>2020-08-30 06:34:27 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-08-30 06:48:35 +0300
commit1a623c183f32fb913f4cadd63d2a667087df7637 (patch)
tree7b9652d7975e646395941b33d0b8d16eab65f4c9
parent530ccde909ec11f092061c9c9afdfb8a668189d3 (diff)
UI: add "Object -> Clean Up" menu
Useful to perform cleanup operations on many objects at once, also these operations weren't accessible from the search menu. This follows the convention for other clean up menus when editing mesh, curve & grease-pencil. Resolves issues raised in T80011
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index deac4e4c507..81985b55666 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -2287,6 +2287,7 @@ class VIEW3D_MT_object(Menu):
layout.separator()
layout.menu("VIEW3D_MT_object_showhide")
+ layout.menu("VIEW3D_MT_object_cleanup")
layout.separator()
@@ -2726,6 +2727,16 @@ class VIEW3D_MT_object_showhide(Menu):
layout.operator("object.hide_view_set", text="Hide Unselected").unselected = True
+class VIEW3D_MT_object_cleanup(Menu):
+ bl_label = "Clean Up"
+
+ def draw(self, _context):
+ layout = self.layout
+
+ layout.operator("object.vertex_group_clean", text="Clean Vertex Group Weights").group_select_mode = 'ALL'
+ layout.operator("object.material_slot_remove_unused", text="Remove Unused Material Slots")
+
+
class VIEW3D_MT_make_single_user(Menu):
bl_label = "Make Single User"
@@ -7447,6 +7458,7 @@ classes = (
VIEW3D_MT_object_constraints,
VIEW3D_MT_object_quick_effects,
VIEW3D_MT_object_showhide,
+ VIEW3D_MT_object_cleanup,
VIEW3D_MT_make_single_user,
VIEW3D_MT_make_links,
VIEW3D_MT_brush_paint_modes,