diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-11-29 04:24:20 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-11-29 04:24:20 +0300 |
commit | 27cccaeccd219e08c6947c3789ed8498f12f7878 (patch) | |
tree | 9801671260b5674695f2314ae4e877eae5ef212d | |
parent | 8850875866a653cbdb9dab39d4182c55db3815ac (diff) |
UI: expand set origin in specials menu
Also remove menu, expand operator instead.
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d.py | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 6e47c4c8a83..0ba3b2217f2 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -438,22 +438,6 @@ class VIEW3D_MT_transform_object(VIEW3D_MT_transform_base): """ -class VIEW3D_MT_transform_origin(Menu): - bl_label = "Origin" - - def draw(self, context): - - layout = self.layout - - layout.operator_context = 'EXEC_AREA' - - layout.operator("object.origin_set", text="Geometry to Origin").type = 'GEOMETRY_ORIGIN' - layout.operator("object.origin_set", text="Origin to Geometry").type = 'ORIGIN_GEOMETRY' - layout.operator("object.origin_set", text="Origin to 3D Cursor").type = 'ORIGIN_CURSOR' - layout.operator("object.origin_set", text="Origin to Center of Mass (Surface)").type = 'ORIGIN_CENTER_OF_MASS' - layout.operator("object.origin_set", text="Origin to Center of Mass (Volume)").type = 'ORIGIN_CENTER_OF_VOLUME' - - # Armature EditMode extensions to Transform menu class VIEW3D_MT_transform_armature(VIEW3D_MT_transform_base): def draw(self, context): @@ -1613,7 +1597,7 @@ class VIEW3D_MT_object(Menu): layout = self.layout layout.menu("VIEW3D_MT_transform_object") - layout.menu("VIEW3D_MT_transform_origin") + layout.operator_menu_enum("object.origin_set", text="Set Origin...", property="type") layout.menu("VIEW3D_MT_mirror") layout.menu("VIEW3D_MT_object_clear") layout.menu("VIEW3D_MT_object_apply") @@ -1748,7 +1732,7 @@ class VIEW3D_MT_object_specials(Menu): layout.separator() layout.operator_context = 'INVOKE_REGION_WIN' - layout.operator("object.origin_set", text="Set Origin...") + layout.operator_menu_enum("object.origin_set", text="Set Origin...", property="type") layout.operator_context = 'INVOKE_DEFAULT' layout.operator("object.join") @@ -5403,7 +5387,6 @@ classes = ( VIEW3D_MT_transform, VIEW3D_MT_transform_base, VIEW3D_MT_transform_object, - VIEW3D_MT_transform_origin, VIEW3D_MT_transform_armature, VIEW3D_MT_mirror, VIEW3D_MT_snap, |