Recently someone was wondering about about a “Save Incremental” button or menu item in another thread. I know it’s just a few clicks as it is, but I have to agree that a simple one stop command to incrementally save you scene would be really nice.
So I’ve been poking around in the code a bit and was able to find the command that does the incremental save. It’s just “bpy.ops.file.filenum()”. After looking at some other code it seems like it should just be “file.filenum” in the menu code. So I was able to edit the pyhton code for the main file menu and add an entry for it:
layout.operator_context = 'INVOKE_AREA' layout.operator("wm.save_as_mainfile", text="Save As...", icon='SAVE_AS') layout.operator_context = 'INVOKE_AREA' layout.operator("wm.save_as_mainfile", text="Save Copy...", icon='SAVE_COPY').copy = True <i><b>layout.operator("file.filenum", text="Save Incremental", icon='PLUS' )</b></i>
I added this just under “Save Copy…”. The problem is that when I run the script, I can see the comment in the menu but it’s grayed. I have no idea why though. Maybe someone who knows more about menu scripting can shed some light on this?
Thanks so much!