Commit: d9d0a386cb02eec14fc8d167e9235fdd18a02c18 Author: Campbell Barton Date: Tue Sep 1 10:03:09 2020 +1000 Branches: master https://developer.blender.org/rBd9d0a386cb02eec14fc8d167e9235fdd18a02c18
Cleanup: don't register mix-in menu class The class is only used as a base for other menus. This caused complications for tests that inspect menu contents. =================================================================== M release/scripts/startup/bl_ui/space_view3d.py =================================================================== diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index a2d78974aeb..7b4d969a6f1 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -920,9 +920,8 @@ class ShowHideMenu: layout.operator("%s.hide" % self._operator_name, text="Hide Unselected").unselected = True -# Standard transforms which apply to all cases -# NOTE: this doesn't seem to be able to be used directly -class VIEW3D_MT_transform_base(Menu): +# Standard transforms which apply to all cases (mix-in class, not used directly). +class VIEW3D_MT_transform_base: bl_label = "Transform" bl_category = "View" @@ -949,7 +948,7 @@ class VIEW3D_MT_transform_base(Menu): # Generic transform menu - geometry types -class VIEW3D_MT_transform(VIEW3D_MT_transform_base): +class VIEW3D_MT_transform(VIEW3D_MT_transform_base, Menu): def draw(self, context): # base menu VIEW3D_MT_transform_base.draw(self, context) @@ -969,7 +968,7 @@ class VIEW3D_MT_transform(VIEW3D_MT_transform_base): # Object-specific extensions to Transform menu -class VIEW3D_MT_transform_object(VIEW3D_MT_transform_base): +class VIEW3D_MT_transform_object(VIEW3D_MT_transform_base, Menu): def draw(self, context): layout = self.layout @@ -1001,7 +1000,7 @@ class VIEW3D_MT_transform_object(VIEW3D_MT_transform_base): # Armature EditMode extensions to Transform menu -class VIEW3D_MT_transform_armature(VIEW3D_MT_transform_base): +class VIEW3D_MT_transform_armature(VIEW3D_MT_transform_base, Menu): def draw(self, context): layout = self.layout @@ -7399,7 +7398,6 @@ classes = ( VIEW3D_HT_tool_header, VIEW3D_MT_editor_menus, VIEW3D_MT_transform, - VIEW3D_MT_transform_base, VIEW3D_MT_transform_object, VIEW3D_MT_transform_armature, VIEW3D_MT_mirror, _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs