Background Python Tasks

   1393   3   1
User Avatar
Member
83 posts
Joined: 2月 2020
Offline
Let's say we wanted to implement a feature like autosave in Houdini. Every x minutes, we're automatically executing some python function to save our project.

How could one implement such an "application-scope" background task feature? It doesn't seem like the kind of thing a shelf tool is meant for.
User Avatar
Member
899 posts
Joined: 2月 2016
Offline
Maybe using the hou.session module?

Also new feature mentioned for 19.5 was I/O async for python...
But I didn't really understand.
What changes ? What can I do now that wasn't possible before?
User Avatar
Member
2 posts
Joined: 7月 2022
Offline
not a good idea for autosave when houdini startup, you can build two python script on shelf,check first to start a global time thread,second to stop it
User Avatar
Member
83 posts
Joined: 2月 2020
Offline
minong7051
not a good idea for autosave when houdini startup, you can build two python script on shelf,check first to start a global time thread,second to stop it

Wouldn't I have to manually click the shelf tool to start the timer though? Or are you suggesting that at startup the tool is automatically triggered somehow? The idea is that I don't have to think about the tool, it knows when to run itself.
  • Quick Links