incremental save script

Forum for OctaneRender Lua scripting examples, discussion and support.
Post Reply
User avatar
abstrax
OctaneRender Team
Posts: 5506
Joined: Tue May 18, 2010 11:01 am
Location: Auckland, New Zealand

Hi all.

This is a little script I meant to do since quite a while: It allows you to save the current project with incrementing file names. This way you can create a history over the development of your project, without having to specify new file names all the time.

The way how it works is this:
- If the project is new and doesn't have a file name yet, a file dialog will pop up asking you to enter the project file name.
- If a project file name is given and it doesn't end with a number, _0001 is appended to the file name.
- If a project file name is given and it ends with a number, this number is incremented.
- If a file with the specified file name already exists, the number is incremented again until a file name has been found that is not used yet.

Limitations/problems:
- Incremental saving of packages is currently not possible, because Octane can't easily switch to a saved package, without loading the new package, which is fairly expensive.
- All incrementally saved projects are added to the recent files menu and will evict fairly quickly older entries. This problem is currently not solvable in Lua.

Here is the script:
Save Incremental.lua
(3.76 KiB) Downloaded 857 times
Just download the file into the script folder you have specified in the application preferences. Run the script with the shortcut ALT-S (which you can modify in the script, of course).

Let me know of any problems you encounter.

Enjoy!
In theory there is no difference between theory and practice. In practice there is. - Yogi Berra
User avatar
glimpse
Licensed Customer
Posts: 3740
Joined: Wed Jan 26, 2011 2:17 pm
Contact:

This one is handy =) Thanks!
Last edited by glimpse on Sat Mar 22, 2014 6:42 am, edited 1 time in total.
User avatar
bepeg4d
Octane Guru
Posts: 10321
Joined: Wed Jun 02, 2010 6:02 am
Location: Italy
Contact:

thanks marcus, for me it deserves to be in the default list ;)
ciao beppe
p.s. funny author ;)
Tugpsx
Licensed Customer
Posts: 1150
Joined: Thu Feb 04, 2010 8:04 pm
Location: Chicago, IL
Contact:

Thanks, this will come in handy.
Win 11 64GB | NVIDIA RTX3060 12GB
Post Reply

Return to “Lua Scripting”