Cleanup: Remove outliner edit mode context menu entries
The outliner context menu has options to enter and exit edit mode, but they only show in edit mode, and they don't work. This removes the broken entries and related code. Part of T77408 Differential Revision: https://developer.blender.org/D8641
This commit is contained in:
@@ -275,7 +275,6 @@ class OUTLINER_MT_object(Menu):
|
||||
|
||||
space = context.space_data
|
||||
obj = context.active_object
|
||||
object_mode = 'OBJECT' if obj is None else obj.mode
|
||||
|
||||
layout.operator("outliner.id_copy", text="Copy", icon='COPYDOWN')
|
||||
layout.operator("outliner.id_paste", text="Paste", icon='PASTEDOWN')
|
||||
@@ -293,16 +292,6 @@ class OUTLINER_MT_object(Menu):
|
||||
|
||||
layout.separator()
|
||||
|
||||
if object_mode in {'EDIT', 'POSE'}:
|
||||
name = bpy.types.Object.bl_rna.properties["mode"].enum_items[object_mode].name
|
||||
layout.operator("outliner.object_operation",
|
||||
text=iface_("%s Set", i18n_contexts.operator_default) % name).type = 'OBJECT_MODE_ENTER'
|
||||
layout.operator("outliner.object_operation",
|
||||
text=iface_("%s Clear", i18n_contexts.operator_default) % name).type = 'OBJECT_MODE_EXIT'
|
||||
del name
|
||||
|
||||
layout.separator()
|
||||
|
||||
if not (space.display_mode == 'VIEW_LAYER' and not space.use_filter_collection):
|
||||
layout.operator("outliner.id_operation", text="Unlink").type = 'UNLINK'
|
||||
layout.separator()
|
||||
|
||||
Reference in New Issue
Block a user