Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/space_outliner.py
| # SPDX-License-Identifier: GPL-2.0-or-later | # SPDX-License-Identifier: GPL-2.0-or-later | ||||
| import bpy | import bpy | ||||
| from bpy.types import Header, Menu, Panel | from bpy.types import Header, Menu, Panel | ||||
| from bpy.app.translations import ( | |||||
| contexts as i18n_contexts, | |||||
| pgettext_iface as iface_, | |||||
| ) | |||||
| class OUTLINER_HT_header(Header): | class OUTLINER_HT_header(Header): | ||||
| bl_space_type = 'OUTLINER' | bl_space_type = 'OUTLINER' | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| space = context.space_data | space = context.space_data | ||||
| ▲ Show 20 Lines • Show All 193 Lines • ▼ Show 20 Lines | |||||
| class OUTLINER_MT_collection(Menu): | class OUTLINER_MT_collection(Menu): | ||||
| bl_label = "Collection" | bl_label = "Collection" | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| space = context.space_data | space = context.space_data | ||||
| layout.operator("outliner.collection_new", text="New").nested = True | layout.operator("outliner.collection_new", text="New", | ||||
| text_ctxt=i18n_contexts.id_collection).nested = True | |||||
| layout.operator("outliner.collection_duplicate", text="Duplicate Collection") | layout.operator("outliner.collection_duplicate", text="Duplicate Collection") | ||||
| layout.operator("outliner.collection_duplicate_linked", text="Duplicate Linked") | layout.operator("outliner.collection_duplicate_linked", text="Duplicate Linked") | ||||
| layout.operator("outliner.id_copy", text="Copy", icon='COPYDOWN') | layout.operator("outliner.id_copy", text="Copy", icon='COPYDOWN') | ||||
| layout.operator("outliner.id_paste", text="Paste", icon='PASTEDOWN') | layout.operator("outliner.id_paste", text="Paste", icon='PASTEDOWN') | ||||
| layout.separator() | layout.separator() | ||||
| layout.operator("outliner.delete", text="Delete", icon='X') | layout.operator("outliner.delete", text="Delete", icon='X') | ||||
| ▲ Show 20 Lines • Show All 273 Lines • Show Last 20 Lines | |||||