kursad
Dec. 23, 2010 22:24:17
Hi
Is there a shortcut for toggling between these 2 modes?
Also is there a shortcut to force recooking?
thanks
archie
Dec. 28, 2010 07:47:36
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()
kursad
Dec. 30, 2010 23:44:47
Thanks archie, this is great tip.
tiredfx
Dec. 14, 2017 12:31:29
Hotkeys an be set here,
From the Edit/Hotkeys…
/Houdini/Update Mode ‘Always’
/Houdini/Update Mode ‘Changes’
/Houdini/Update Mode ‘Never’
Adriano
Feb. 24, 2022 14:02:14
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.
shadesoforange
Feb. 25, 2022 04:42:37
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)
shadesoforange
Feb. 25, 2022 04:44:44
On a similar note; this script lets you toggle between enabling/disabling simulations:
if hou.simulationEnabled() == 0:
hou.setSimulationEnabled(1)
else:
hou.setSimulationEnabled(0)
Zef
June 14, 2022 19:56:25
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)
animatrix_
June 15, 2022 04:31:48
I use . / Auto/Manual toggle and . for Force Update action so I can explicitly decide when to cook.