incremental save script
Posted: 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,
- 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:
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!
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:
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!