Does Houdini have save auto-increment option?

   7215   11   2
User Avatar
Member
2 posts
Joined: April 2019
Offline
This is probably a dumb question - but does Houdini have auto increment saving option? I searched for like 20 min and couldn't find information on it. I am on the free version(for hobbyists/learners) if that makes any difference.
User Avatar
Staff
3455 posts
Joined: July 2005
Offline
Edit > Preferences > Save and Load Options
Save method: Increment File name
Michael Goldfarb | www.odforce.net
Training Lead
SideFX
www.sidefx.com
User Avatar
Member
30 posts
Joined: May 2017
Offline
This feature was know to me as well, but it is quite useless as you don't want to get rid of your ability to simply save over your previous file and would create unnecessary amounts of workfile-data. Instead, what I always use is Niklas Rosenstein's great shelf script:
https://www.niklasrosenstein.com/post/2017-07-13-houdini-incremental-save/ [www.niklasrosenstein.com]
It's very versatile and pretty much unbreakable!

If Houdini were to natively adopt this as a feature next to the other save options (Like a lot of other DCCs already have), I'm sure a lot of artists would appreciate that in being able to cross one of their tools that they always have to reinstall off their list.
Edited by martin-egger - April 20, 2020 09:09:52
- Martin Egger
Student at Filmakademie BW
& Freelance FX TD
User Avatar
Member
251 posts
Joined: July 2013
Offline
I ran into the same issue so I made a nice little script. What is does is create a ‘rolling’ backup with a maximum of files being kept. After each save it will automatically check the scene's backup folder and deletes the older ones, keeping a fixed number of backup around. it keeps two types of backups, one is created every time you manually save the scene, and an ‘_auto’ one that is created at given intervals you can set in your Houdini prefs.

Unzip attachment and place both in your Houdini's document script dir.

(the 456.cmd turn on the ‘autosave’ for you, by default it's turned off when you restart Houdini)

In the zip you'll find the script below, the ‘max_files’ in the script is the max files to keep around.

#place in $home/scripts/afterscenesave.py
#Jonathan de Blok
import os
import glob

verbose_only=False
max_files=15

file=kwargs["file"]
if file.find('/backup/')>0:
    print "WARNING, saving into a backup folder.. skipped pruning"
else:
    #prune auto backup files                
    if kwargs["success"] and kwargs["autosave"]:

        files = glob.glob(os.path.dirname(file)+"/backup/"+os.path.splitext( os.path.basename(file))[0]+"*_auto*.hip*")
        files.sort(key=os.path.getmtime)
        for item in files[:-1*max_files]:
            if item.find("_auto")>0 and item.find(".hip")>0 and item.find("*")==-1:
                if not verbose_only:
                    os.remove(item)
                    print "Pruned autosave backup file: " + item		
                else:
                    print "would have Pruned backup file: " + item

    #prune normal backup files                          
    if kwargs["success"] and not kwargs["autosave"]:

        files = glob.glob(os.path.dirname(file)+"/backup/"+os.path.splitext( os.path.basename(file))[0]+"*_bak*.hip*")
        files.sort(key=os.path.getmtime)

        
        for item in files[:-1*max_files]:
            if item.find("_bak")>0 and item.find(".hip")>0 and item.find("*")==-1:  
                if not verbose_only:
                    os.remove(item)
                    print "Pruned autobackup file: " + item
                else:
                    print "would have normal backup file: " + item
Edited by Jonathan de Blok - April 20, 2020 10:34:10

Attachments:
autosave_scripts.zip (784 bytes)

More code, less clicks.
User Avatar
Member
251 posts
Joined: July 2013
Offline
ohh.. wait I kind of mis read your question but the above might come in handy none the less.
More code, less clicks.
User Avatar
Member
678 posts
Joined: Feb. 2017
Offline
martin-egger
https://www.niklasrosenstein.com/post/2017-07-13-houdini-incremental-save/ [www.niklasrosenstein.com]

Does anybody have a backup of this script? I would like to use it. Unfortunately, it isn't available anymore.

Cheers
CYTE
User Avatar
Member
320 posts
Joined: May 2016
Offline
CYTE
martin-egger
https://www.niklasrosenstein.com/post/2017-07-13-houdini-incremental-save/ [www.niklasrosenstein.com]

Does anybody have a backup of this script? I would like to use it. Unfortunately, it isn't available anymore.

Cheers
CYTE
I clicked on it and it did download
User Avatar
Member
678 posts
Joined: Feb. 2017
Offline
bobc4d
CYTE
martin-egger
https://www.niklasrosenstein.com/post/2017-07-13-houdini-incremental-save/ [www.niklasrosenstein.com]

Does anybody have a backup of this script? I would like to use it. Unfortunately, it isn't available anymore.

Cheers
CYTE
I clicked on it and it did download
Great would you be so kind and attach it here I get a 404:

Attachments:
404.jpg (23.4 KB)

User Avatar
Member
85 posts
Joined: Oct. 2018
Offline
You can get it here - https://github.com/nrosenstein-old/houdini-library [github.com]
User Avatar
Member
85 posts
Joined: Oct. 2018
Offline
These are also useful… https://www.axisfx.design/tools
User Avatar
Member
678 posts
Joined: Feb. 2017
Offline
@hMonkey Thank You!
User Avatar
Member
1 posts
Joined: Aug. 2021
Offline
Is there a way to have the autosave just create the file in the backup folder but NOT overwrite the current file?
  • Quick Links