Jump to content
Juzwa

Default autosave

Recommended Posts

Hi, 

 

Can anyone pls enlight me how to make houdini autosave on default? I don't want to set this everytime I launch H

Edited by Juzwa

Share this post


Link to post
Share on other sites

Hi,

 

In your $HOME/houdniversion/scripts folder create 456.py file with this content:

import hou
hou.appendSessionModuleSource('''hou.hscript("autosave on")''')
  • Like 4

Share this post


Link to post
Share on other sites

 

Hi,

 

In your $HOME/houdniversion/scripts folder create 456.py file with this content:

import hou
hou.appendSessionModuleSource('''hou.hscript("autosave on")''')

 

 

May I ask a silly question? Why does it have to be 456.py? I changed the file name and the code stopped working.

Share this post


Link to post
Share on other sites

Hello i have a question about this;

i can't find the scripts folder you are talking about

Also; there is no folder called 'Houdini 15' or something in my home folder. (mac)

the only scripts folder i can find is in my project folder, but that is project based, right?

 

And how do i create a .py file?

Share this post


Link to post
Share on other sites

on mac it will be in /Users/yourName/Library/Preferences/Houdini

I always drag this Houdini folder into my sidebar for quick access.

in there you will find a folder for every version major/minor version of Houdini that you have installed (14.0, 15.0 etc)

this is where Houdini stores all sorts of preference files and installed plugins...

 

a .py file is a python file

just open a text editor (not TextEdit.app - it sucks) and write the code you want/need (it must be valid python code) and save it with the .py extension 

Share this post


Link to post
Share on other sites

Thank you so much :)

Edited by DévinOdforce

Share this post


Link to post
Share on other sites

I'm trying to set this up for the whole studio, I have it working in my 456.py with:

hou.hscript('autosave on')

But autosave defaults to save every 1 minute, how can I change this (through the 456.py or some other method) to every 10 minutes for example? I can't find anything relevant in hscript or hou..

Share this post


Link to post
Share on other sites

Someone else noticed this doesn’t work anymore in H18? At least with me it doesn’t.. 

I am on Houdini 18.0.416 right now.
Did anything change? 

Thanks again,

Edit: Not needed anymore. It just works now.

Edited by Krion

Share this post


Link to post
Share on other sites
On 4/23/2020 at 6:07 PM, Krion said:

Edit: Not needed anymore. It just works now.

I does not work for me... on H18 on linux. Can't make autosave on by default. Am I missing something?

Share this post


Link to post
Share on other sites

You can try to set it in your 456.cmd file in $HOME/houdiniX.Y/scripts/456.cmd (X=Major version, Y=Minor version, e.g.: 18.0) directly:

autosave on

 

https://www.sidefx.com/forum/topic/25350/

Or you can ask the user what they want: https://www.sidefx.com/forum/topic/12971/#post-61684

I like the idea of having it in File Menu under File Save As too: https://www.sidefx.com/forum/topic/12971/#post-256607

Environment variable to force it on/off wouldn't be bad but it is a little bit harder to discover: https://www.sidefx.com/forum/topic/45068/#post-201467 and there is already plenty of other options.

Always on in preferences (GUI) was probably already requested, but you can add RFE (voice) for it too.

 

Share this post


Link to post
Share on other sites
Posted (edited)
On 4/24/2015 at 5:54 PM, pezetko said:

 


import hou
hou.appendSessionModuleSource('''hou.hscript("autosave on")''')

Just curious, regarding the Python method, what's the Python 3 version of this?

 

Didn't have the time to look into the differences between Python 2 & 3, but I am going to look now in that 456.cmd method and watch those links. Asking the user seems like a nice option indeed.

EDIT: both 456.cmd versions do not seem to work. :( I am on version "18.5.462 Python 3".

Edited by Krion

Share this post


Link to post
Share on other sites

Hi, it should be the same.

Just tested both 456.cmd and 456.py on 18.5.514 (apprentice) on Windows 10 and it is working fine (456.cmd script is running on scene open/new file).

O would prefer 456.cmd over 456.py as the python version modifies the session module and it could result in inserting this script multiple times if you don't add guard against that.

 

Btw: Now the 123.py works only in Houdini FX. The Core has houdinicore.py instead. https://www.sidefx.com/docs/houdini/hom/locations.html#startup

Alternatively, you can use pythonrc.py it is running only on startup (same as 123 scripts).

 

But for always-on autosave, I would go with 456.cmd variant.

 

 

Share this post


Link to post
Share on other sites
Posted (edited)

Thanks, it was actually something else in my packages folder that was causing the issue. The Houdini ToolBox library.

After deleting that now the autosave scripts work. (btw I pressed sideFX in an RFE too during this time that they should make this an ui option)

Edited by Krion

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×