Post #1156: ![](https://blenderartists.org/user_avatar/blenderartists.org/leafar/48/661663_2

📋 Metadata

  • Author: roaoao
  • Date: 2017-12-22 08:08:10
  • Type: answer
  • Quality Score: 7/10
  • Reply to: post_01155

🏷️ Tags

scripting intermediate solved

  • Python Scripting
  • Macro Editor

💬 Content

Leafar:

Want to add and share a line of code to save + 1 but this line does not work for me for saving with increment, why??

bpy.ops.file.filenum(‘EXEC_DEFAULT’, increment=1)

Hi, looks like this command works only in Blender’s file browser.

You can write some custom script to save the file using bpy.ops.wm.save_as_mainfile(filepath=‘…’) and bpy.data.filepath


🔗 View on Blender Artists