10
$\begingroup$

I'm accustomed to saving frequently using Ctrl+S in Blender. Each time I do this, Blender pops up the "Save Over?" button, which I have to click (or press Enter).

This gets in the flow of things. Is there a reasonably simple method to disable this behavior and just Save Over without prompting. (Reasonably simple meaning without modifying Blender's source code.)

$\endgroup$
  • 1
    $\begingroup$ One of the more alien design choices in Blender! I wish we could disable it as well. $\endgroup$ – Andy Ray Mar 14 '16 at 20:46
7
$\begingroup$

To the best of my knowledge, this cannot be changed. Here are a few workarounds that might be helpful however.

Use a script

If you use the command bpy.ops.wm.save_mainfile() and register a shortcut, you would just need to do a normal save once (for Blender to get the path) and after that, use CtrlShift + Y as I have done in the script below to save without any popups. (You can also change this if you want, see the commented line).

import bpy

class SaveWithoutPrompt(bpy.types.Operator):
    bl_idname = "object.save_without_prompt"
    bl_label = "Save without prompt"

    def execute(self, context):
        bpy.ops.wm.save_mainfile()
        return {'FINISHED'}

def menu_func(self, context):
    self.layout.operator(SaveWithoutPrompt.bl_idname)

addon_kmaps = []

def register():
    bpy.utils.register_class(SaveWithoutPrompt)

    wm = bpy.context.window_manager
    km = wm.keyconfigs.addon.keymaps.new(name='Object Mode', space_type='EMPTY')
    # change the shortcut here..
    kmi = km.keymap_items.new(SaveWithoutPrompt.bl_idname, 'Y', 'PRESS', ctrl=True, shift=True)
    addon_kmaps.append(km)

def unregister():
    bpy.utils.unregister_class(SaveWithoutPrompt)
    bpy.types.VIEW3D_MT_object.remove(menu_func)

    wm = bpy.context.window_manager
    for km in addon_kmaps:
        wm.keyconfigs.addon.kmaps.remove(km)
    del addon_kmaps[:]

if __name__ == "__main__":
    register()


Set the autosave feature to save more often

enter image description here

You could have Blender save a copy of the file you are working on every minute. This runs in the background so no popups. You can find this feature under the File tab in your User Preferences.

Related, Blender saves a new file every time

$\endgroup$
  • $\begingroup$ Wouldn't it be possible to overwrite the Ctrl+S shortcut with the script? (so Ctrl+S executes the script instead of the popup) you could probably also make the script call the file browser if the file has not yet been saved. $\endgroup$ – gandalf3 Sep 20 '13 at 1:23
  • $\begingroup$ @gandalf3 It is possible to overwrite Ctrl + S and yes, a first call to save could be done, I omitted that bit since I was in class at the time. Really trivial tho. $\endgroup$ – iKlsR Sep 20 '13 at 1:51
3
$\begingroup$

No, The way the save operator (bpy.ops.wm.save_mainfile) works is when its activated with the filepath property set (as with File -> Save), it will execute immediately, but when its activated from a key-binding where the filepath is not set. it will activate a popup menu.

The only way around this is to create your own operator which calls bpy.ops.wm.save_mainfile with the filepath set. Then bind the key to this new operator.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.