auto autosave

   2382   4   1
User Avatar
Member
66 posts
Joined: March 2016
Offline
There is an option to active the autosave every time I start houdini?

thanks
Gerardo Castellanos
www.gerardocastellanos.com
User Avatar
Member
14 posts
Joined: Nov. 2019
Offline
You can set autosave on by default using python scripting. In your script folder, you can create or modify your 456.py by adding:

hou.appendSessionModuleSource(hou.hscript(“autosave on”))

Hope that helps

Cheers,
Pietro
User Avatar
Member
66 posts
Joined: March 2016
Offline
the right code is
hou.appendSessionModuleSource('hou.hscript("autosave on")')
Gerardo Castellanos
www.gerardocastellanos.com
User Avatar
Member
25 posts
Joined: April 2018
Online
Sorry to reopen this, but I can't for the sake of it, get it to work. My Houdini just won't run the startup script!

Subject: 123.py / Startup Scripts completely failing (H21 Indie / Win 10)

Hi everyone, I’m hitting a wall with startup scripts and could really use a second pair of eyes. I cannot get 123.py (or 456.py) to execute on startup, no matter what I try.

The Setup:

Version: Houdini 21.0.xxx Indie
OS: Windows 10
Goal: Force autosave on at launch.
What I have confirmed:
Path: Documents/houdini21.0/scripts/123.py exists.
Textport: echo $HOUDINI_USER_PREF_DIR points correctly to that houdini21.0 folder.
Filenames: Hidden extensions are ON; it is definitely 123.py, not 123.py.txt.
Environment: My houdini.env is clean (I even tried a version with HOUDINI_PATH = "C:/CustomPath;&" and moved the script there—still nothing).
Simplicity: The script only contains a hou.ui.displayMessage("Hello") and a print statement to test if it's even attempting to run. No pop-up appears and nothing shows in the console.

The Weird Part:
The Python Shell works fine manually, but Houdini seems to be completely bypassing the scripts folder during the boot sequence.

Has anyone encountered H21 ignoring the local scripts directory? Is there a new security setting or a specific "Indie" environment override I might be missing?

Thanks in advance!
Edited by josbin - March 5, 2026 07:54:15
User Avatar
Member
118 posts
Joined: Oct. 2018
Offline
are you importing hou?

import hou

print("[456.py] - Init")

def main():

    hou.appendSessionModuleSource('''hou.hscript("autosave on")''')
    message = " AutoSave - Enabled"
    print("[456.py] - AutoSave - Enabled")


if __name__ == '__main__':
    main()
print("[456.py] - Done.")
  • Quick Links