shortcut for "Auto Update" and "Manual update

   17826   8   6
User Avatar
Member
88 posts
Joined: March 2010
Offline
Hi

Is there a shortcut for toggling between these 2 modes?

Also is there a shortcut to force recooking?


thanks
User Avatar
Member
71 posts
Joined: June 2008
Offline
Hi, kursad!
1)You can create the simple script for toggle between “Auto Update” and “Manual update”, for example:
import hou
mode = hou.updateModeSetting().name()
if mode == ‘AutoUpdate’:
hou.setUpdateMode(hou.updateMode.Manual)
if mode == ‘Manual’:
hou.setUpdateMode(hou.updateMode.AutoUpdate)
After then you should create a tool in the your custom shelf and put the script over there. Also you will see folder “Hotkeys” and you can assign hotkey.

2)There is two way to assign hotkey for the recooking. The first way is global method: Hotkey Manager → Houdini → Force Update. In this case you will override modes like that “Auto Update”, “Manual update” and “On mouse up”. The second way is the simple script for selected nodes (It'll work only for “Auto Update”). That script you can also put in the your tool on the shelf.
import hou
nodes = hou.selectedNodes()

Alexey Mazurenko
User Avatar
Member
88 posts
Joined: March 2010
Offline
Thanks archie, this is great tip.
User Avatar
Member
11 posts
Joined: Sept. 2007
Offline
Hotkeys an be set here,

From the Edit/Hotkeys…


/Houdini/Update Mode ‘Always’

/Houdini/Update Mode ‘Changes’

/Houdini/Update Mode ‘Never’
Edited by tiredfx - Dec. 14, 2017 12:32:43
User Avatar
Member
407 posts
Joined: June 2015
Offline
archie
Hi, kursad!
1)You can create the simple script for toggle between "Auto Update" and "Manual update", for example:
import hou
mode = hou.updateModeSetting().name()
if mode == 'AutoUpdate':
hou.setUpdateMode(hou.updateMode.Manual)
if mode == 'Manual':
hou.setUpdateMode(hou.updateMode.AutoUpdate)
After then you should create a tool in the your custom shelf and put the script over there. Also you will see folder "Hotkeys" and you can assign hotkey.

2)There is two way to assign hotkey for the recooking. The first way is global method: Hotkey Manager → Houdini → Force Update. In this case you will override modes like that "Auto Update", "Manual update" and "On mouse up". The second way is the simple script for selected nodes (It'll work only for "Auto Update"). That script you can also put in the your tool on the shelf.
import hou
nodes = hou.selectedNodes()



Any chance you could share the updafted code for this gem please? This seems to be outdated. Tried to drop it in Houdini 19 and i'm getting a syntax error.

Cheers,

A.
Edited by Adriano - Feb. 24, 2022 14:03:26
User Avatar
Member
201 posts
Joined: July 2015
Offline
It works fine for me if you take care of proper intendation.

import hou
mode = hou.updateModeSetting().name()
if mode == 'AutoUpdate':
    hou.setUpdateMode(hou.updateMode.Manual)
if mode == 'Manual':
    hou.setUpdateMode(hou.updateMode.AutoUpdate)
Manuel Köster - Senior Technical Artist @Remedy Entertainment

https://www.remedygames.com/ [www.remedygames.com]
http://shadesoforange.de/ [shadesoforange.de]
https://twitter.com/ShadesOfOrange_ [twitter.com]
User Avatar
Member
201 posts
Joined: July 2015
Offline
On a similar note; this script lets you toggle between enabling/disabling simulations:
if hou.simulationEnabled() == 0:
    hou.setSimulationEnabled(1)
else:
    hou.setSimulationEnabled(0)
Manuel Köster - Senior Technical Artist @Remedy Entertainment

https://www.remedygames.com/ [www.remedygames.com]
http://shadesoforange.de/ [shadesoforange.de]
https://twitter.com/ShadesOfOrange_ [twitter.com]
User Avatar
Member
2 posts
Joined: May 2018
Offline
shadesoforange
It works fine for me if you take care of proper intendation.

import hou
mode = hou.updateModeSetting().name()
if mode == 'AutoUpdate':
    hou.setUpdateMode(hou.updateMode.Manual)
if mode == 'Manual':
    hou.setUpdateMode(hou.updateMode.AutoUpdate)


Nice!
Does anyone have a preferred or recommended shortcut for this toggle? (i.e. semi-standard or common)
User Avatar
Member
4495 posts
Joined: Feb. 2012
Offline
I use . / Auto/Manual toggle and . for Force Update action so I can explicitly decide when to cook.
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | animatrix2k7.gumroad.com
  • Quick Links