Extending the Drop Blend File Operator Menu

When you drop a blend file onto the viewport you get a menu that allows you to open, append, or link information. I would like to extend this menu with my add-on, but i’m not sure if this is possible.

Instead of calling a menu an operator is called. The operator that is called is located in scripts/startup/bl_operators/wm.py

I have tried to use the append method like you would with a regular menu, but this of course doesn’t work since operators don’t have an append method.


Anyone know of a way to extend this operator menu.

You can try to register operator with similar name and completely rework how it is works:
Example below dont work as original operator(but invokes on filedrop). Maybe instead calling “wm.link”, “wm.append”, “wm.open_mainfile” operators you will need make another one.

import bpy

class WM_OT_drop_blend_file(bpy.types.Operator):
    bl_idname = "wm.drop_blend_file"
    bl_label = "Dropper Wrapper"
    bl_description = "Dropper Wrapper"
    bl_options = {'REGISTER', 'UNDO'}

    filepath : bpy.props.StringProperty()

    def poll(self, context):
        return True

    def invoke(self, context, event):
        return context.window_manager.invoke_popup(self, width=400)

    def execute(self, context):

        return {'FINISHED'}

    def draw(self, context):

        self.layout.operator("wm.open_mainfile", text="Open", icon='FILE_FOLDER').filepath = self.filepath

        self.layout.operator("wm.link", text="Link", icon='LINK_BLEND').filepath = self.filepath
        self.layout.operator("wm.append", text="Append", icon='APPEND_BLEND').filepath = self.filepath


        self.layout.label(text="Other stuff")