shortcut for "Auto Update" and "Manual update

   22693   8   6
User Avatar
Member
88 posts
Joined: 3月 2010
オフライン
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: 6月 2008
オフライン
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: 3月 2010
オフライン
Thanks archie, this is great tip.
User Avatar
Member
11 posts
Joined: 9月 2007
オフライン
Hotkeys an be set here,

From the Edit/Hotkeys…


/Houdini/Update Mode ‘Always’

/Houdini/Update Mode ‘Changes’

/Houdini/Update Mode ‘Never’
Edited by tiredfx - 2017年12月14日 12:32:43
User Avatar
Member
415 posts
Joined: 6月 2015
オンライン
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 - 2022年2月24日 14:03:26
User Avatar
Member
203 posts
Joined: 7月 2015
オフライン
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
203 posts
Joined: 7月 2015
オフライン
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: 5月 2018
オフライン
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
5130 posts
Joined: 2月 2012
オフライン
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] https://lnk.bio/animatrix [lnk.bio]
  • Quick Links