incremental save script

Forums: incremental save script
Forum for OctaneRender Lua scripting examples, discussion and support.

incremental save script

Postby abstrax » Fri Mar 21, 2014 1:23 pm

abstrax Fri Mar 21, 2014 1:23 pm
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 302 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
abstrax
OctaneRender Team
OctaneRender Team
 
Posts: 5069
Joined: Tue May 18, 2010 11:01 am
Location: Auckland, New Zealand

Re: incremental save script

Postby glimpse » Fri Mar 21, 2014 1:32 pm

glimpse Fri Mar 21, 2014 1:32 pm
This one is handy =) Thanks!
Last edited by glimpse on Sat Mar 22, 2014 6:42 am, edited 1 time in total.
tomGlimps | [email protected] | 32GB | TitanBlack
Available for Freelance, Coaching & Mentoring
User avatar
glimpse
Licensed Customer
Licensed Customer
 
Posts: 3576
Joined: Wed Jan 26, 2011 2:17 pm

Re: incremental save script

Postby bepeg4d » Fri Mar 21, 2014 9:33 pm

bepeg4d Fri Mar 21, 2014 9:33 pm
thanks marcus, for me it deserves to be in the default list ;)
ciao beppe
p.s. funny author ;)
User avatar
bepeg4d
Octane Guru
Octane Guru
 
Posts: 6510
Joined: Wed Jun 02, 2010 6:02 am
Location: Italy

Re: incremental save script

Postby Tugpsx » Sat Mar 22, 2014 5:04 am

Tugpsx Sat Mar 22, 2014 5:04 am
Thanks, this will come in handy.
Dell Win Vista 32 | NVIDIA Quadro NVS135M | Core2 Duo T7500 2.20GHz | 4GB
CyberPowerPC Win 7 64| NVIDIA GTX660Ti (3G) GTX480(1.5G) | 16GB
Tugpsx
Licensed Customer
Licensed Customer
 
Posts: 1058
Joined: Thu Feb 04, 2010 8:04 pm
Location: Chicago, IL

Return to Lua Scripting


Who is online

Users browsing this forum: No registered users and 1 guest

Sat Jul 20, 2019 2:54 am [ UTC ]