import os,glob def visualise(flag): if flag ==1: hou.selectedNodes()[0].setDisplayFlag(1) if flag ==2: hou.selectedNodes()[0].setRenderFlag(1) if flag ==3: if len(hou.selectedNodes())>0: state = 1-hou.selectedNodes()[0].isTemplateFlagSet() for i in hou.node(os.path.dirname(hou.selectedNodes()[0].path())).glob('*'): i.setTemplateFlag(0) for i in hou.selectedNodes(): i.setTemplateFlag(state) if flag ==4: state = 1-hou.selectedNodes()[0].isBypassed() for i in hou.selectedNodes(): i.bypass(state) visualise(4)
This is straight out of Nukeland for snapping your nodes to the grid intersections. I have it set as Shift+\
And finally the most common one I need to not yell at the everlasting cookfests. I have it set to Alt+Shift+U, which is a bit Vulcan MindMeldy but it works. I also set Alt+U to "/Houdini/Force Update"
import hou mode = hou.updateModeSetting().name() if mode == 'AutoUpdate': hou.setUpdateMode(hou.updateMode.Manual) if mode == 'Manual': hou.setUpdateMode(hou.updateMode.OnMouseUp) if mode == 'OnMouseUp': hou.setUpdateMode(hou.updateMode.AutoUpdate)
No comments :
Post a Comment