Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_operators/wm.py
| Show First 20 Lines • Show All 1,741 Lines • ▼ Show 20 Lines | class WM_OT_drop_blend_file(Operator): | ||||
| def invoke(self, context, _event): | def invoke(self, context, _event): | ||||
| context.window_manager.popup_menu(self.draw_menu, title=bpy.path.basename(self.filepath), icon='QUESTION') | context.window_manager.popup_menu(self.draw_menu, title=bpy.path.basename(self.filepath), icon='QUESTION') | ||||
| return {'FINISHED'} | return {'FINISHED'} | ||||
| def draw_menu(self, menu, _context): | def draw_menu(self, menu, _context): | ||||
| layout = menu.layout | layout = menu.layout | ||||
| col = layout.column() | col = layout.column() | ||||
| col.operator_context = 'EXEC_DEFAULT' | col.operator_context = 'INVOKE_DEFAULT' | ||||
| col.operator("wm.open_mainfile", text="Open", icon='FILE_FOLDER').filepath = self.filepath | props = col.operator("wm.open_mainfile", text="Open", icon='FILE_FOLDER') | ||||
| props.filepath = self.filepath | |||||
| props.display_file_selector = False | |||||
| layout.separator() | layout.separator() | ||||
| col = layout.column() | col = layout.column() | ||||
| col.operator_context = 'INVOKE_DEFAULT' | col.operator_context = 'INVOKE_DEFAULT' | ||||
| col.operator("wm.link", text="Link...", icon='LINK_BLEND').filepath = self.filepath | col.operator("wm.link", text="Link...", icon='LINK_BLEND').filepath = self.filepath | ||||
| col.operator("wm.append", text="Append...", icon='APPEND_BLEND').filepath = self.filepath | col.operator("wm.append", text="Append...", icon='APPEND_BLEND').filepath = self.filepath | ||||
| Show All 37 Lines | |||||