Is it possible to make the delete prompt go away?

Is it possible to make the delete prompt go away with some script or a addon?


class ObjectDeleteNoConfirm(bpy.types.Operator):
    """Delete selected objects without the confirmation popup"""
    bl_idname = "object.delete_no_confirm"
    bl_label = "Delete Objects No Confirm"
    bl_options = {'UNDO'}
    
    @classmethod
    def poll(cls, context):
        return len(context.selected_objects) > 0

    def execute(self, context):
        bpy.ops.object.delete()

        return {'FINISHED'}

Taken from Blender 2012 experimental keymap by Nathan Vaghdal

There is other operators that deal with mesh delete and dissolve as well, however I did not test if they still work properly.

As someone who has worked with this workflow, I’d recommend either not doing it at all, or at least removing delete as a hotkey linked to X. I can’t even count the number of times where I accidentally bumped the X key and totally trashed a multires sculpt or accidentally deleted an object from a dense scene that I didn’t notice until it was far too late for undo to save me.

Although m9105826’s comments make sense in some scenarios, if you have a workflow similar to mine this is what you’re looking for:

NP Delete Fast

Thanks, but I cannot seem to add either the script or the addonfile. I get the “sourche file is in the <path>” I tried to add it from the path as well, but the .py files wont show up in the addon menu.

@Asmund, it should be enough to manually copy the .py file into your add-ons-folder. To find the path to the folder open “User Preferences - Add-ons”, expand the entry of any working addon by clicking on the little arrow and look at the “File” row.

Cool idea to have a shortcut for immediate deletion! It could be set to Shift-x as a comfortable shortcut. By default it is used by “delete globally” (all scenes), I almost never use that. Also this is doubled by Shift-Del anyway so global delete would be still accessible as a hotkey.
Shift-X is aso not taken in Mesh Edit Mode which makes me want to add a “immediate delete selection”-script to that key. Maybe derive the type of elements to delete from the current Mesh Select Mode.
Ctrl-x is immediate dissolve by the way.

I copyed Proxe`s code and saved it as “all files” in notepad. Placed it in the addon folder. But I get the “source file” message everytime. What do I miss? Reason for that I want this, is that Im setting up Blender as close to Maya as possible, so it feels like Im using Maya instead of Blender :slight_smile: My Blender looks like this now (Thanks BMax)



proxe’s code is just a snippet, not a complete add-on. Try Okavango’s NP Delete Fast. It’s working fine here.

I’m sure the blender pigeon build has a feature allowing you to turn on or off whether blender asks confirmation before you delete objects etc…

(An example of this delete feature is shown in the second image of the 1st post in the thread)