autosave and the session module

   707   0   0
User Avatar
Member
5 posts
Joined: 11月 2013
オフライン
Hey people,
recently, I've had to spend some time with the Houdini autosave functionality. I found that there are three ways to activate or deactivate the autosave via Python. Firstly, write the hscript wrapper to the session module:
hou.appendSessionModuleSource('''hou.hscript("autosave on")''')

This is the recommended variant at least in terms of frequency, when googled for. However, it works just fine without writing it to the session module:
hou.hscript("autosave on")

The same thing can also be done without hscript by simply setting the preference:
hou.setPreference('autoSave','1')

A downside of appending it to the session module is that it tends to accumulate there. This is not necessarily a problem, however, it just seems to be a messy way to do it, especially if the session module is used as intended, that is, as a repository for code that is accessible session-wide.

Can someone enlighten me as to why the first version is the preferred one? Or has it been suggested once upon a time and just been parroted ever since? Thanks in advance for any input on the topic!
Edited by QuantumCabbage - 2025年4月14日 08:31:15

Attachments:
session_module.png (269.7 KB)

  • Quick Links