|On this page|
Handle class lets you manipulate handles bound to viewer states.
Creates an object for accessing a handle of a given name. hou.Handle is typically used with python viewer states.
Handle objects are typically created from a python viewer state constructor. However, calling
Handle objects must be done once the state has been entered, exceptions will be
A hou.SceneViewer object referencing the scene viewer where the handle is going to be used. Exception is thrown if the scene viewer is not compatible.
class MyState(object): def __init__(self, state_name, scene_viewer): self.state_name = state_name self.scene_viewer = scene_viewer self.handle = hou.Handle(scene_viewer, "Transform") # Create a template to describe the state and its bindings template = hou.ViewerStateTemplate("mystate", "My Custom State", hou.sopNodeTypeCategory()) template.bindFactory(MyState) template.bindHandle("xform", "Transform")
The name of this handle.
Shows or hides the handle.
True to show the handle,
False to hide it.
Returns the type name of the handle. The return value corresponds to the type used for binding the handle. See hou.ViewerStateTemplate.bindHandle() or hou.ViewerStateTemplate.bindStaticHandle for details.
This method forces the handle to update. Useful if a change made to a viewer state requires one of its handle to get updated. For dynamic handles, this will trigger a call to the
onStateToHandle callback, allowing the viewer state to update the proper handle parameter(s).
True if the handle is visible,