Viewer panes such as a Scene Viewer or Compositor Viewer can enter specific “states”. A state controls the available handles, mouse interactions, and in some cases node creation or deletion based on user interaction with the viewer pane. This class does not represent a running state in a viewer, but instead describes a state that can be entered with methods such as hou.SceneViewer.setCurrentState or hou.CompositorViewer.setCurrentState.
Each node type that can be displayed in a viewer pane will have an associated viewer state (though not all viewer states need to be associated with a node type). This node type specific viewer state is used to create new instances or edit existing instances of the node type in a viewer pane.
The list of viewer states associated with a given node type category is returned from the hou.NodeTypeCategory.viewerStates method.
Methods ¶
categories()
→ tuple
of hou.NodeTypeCategory
Return the node type category for the nodes that are associated with this state.
description()
→ string
Return the brief name of the state that appears in the upper left corner of the viewer pane when this state is active.
icon()
→ string
Return the icon for the state that appears in the upper left corner of the viewer pane when this state is active.
isHidden()
→ bool
Returns whether this state is “hidden”. A hidden state has no shelf tool and is not available on the Tab menu.
name()
→ string
Return the internal name of this state, which is the string that must be
passed to the setCurrentState()
method of the viewer pane to enter this
state.
nodeType()
→ hou.NodeType or None
Return the node type associated with this state. May return None if this state is not associated with a particular node type, such as the SOP or Object View states which are used for panning and tumbling in a scene viewer pane.
hotkey()
→ string
Return the hotkey associated with this state.
parmTemplates()
→ hou.ParmTemplateGroup
Return the parameter templates associated with this state.