| On this page | |
| Inheritance |
|
Overview ¶
A hou.ViewerStateContext holds the contextual information related to the running viewer state such as
the gadget drawable bindings. Viewer state implementations can access their context
instance through the state_context data member.
Methods ¶
postScale()
→ hou.Vector3
Return the post-scale vector used during rendering to position hou.Drawable2D objects. See hou.Drawable2D for details.
postTransform()
→ hou.Matrix4
Returns the post-transform matrix assigned to hou.Drawable2D objects. See hou.Drawable2D for details.
fixedSizeScale()
→ double
Returns the scale factor used to render fixed-size hou.Drawable2D objects when zooming in or out. Use hou.Drawable2D.setFixedSize to enable fixed-size rendering for a drawable.
See hou.Drawable2D.fixedSizeScale
Note
Python states can use this value to account for fixed-size scaling when interacting with drawables (e.g., when manipulating guides that rely on fixed-size visuals).
Methods from hou.GadgetContext ¶
name()
→ string
Returns the name of the active drawable. A drawable is active when it is picked or when the mouse moves over its visuals (located).
label()
→ string
The active drawable label name.
gadget()
→ string
Similar to name().
gadgetLabel()
→ string
Similar to label().
component1()
→ int
A component id of the active gadget geometry. The id refers to either a polygon, a polygon vertex or the start point of a line geometry. Returns -1 if no gadget is active.
Note
This method does not apply to hou.Drawable2D objects.
component2()
→ int
A component id of the active gadget geometry. The returned id typically identifies the end point of a line geometry. Returns -1 if no line geometry is picked or located, or no gadget is active.
Note
This method does not apply to hou.Drawable2D objects.
isDrawing()
→ bool
Returns True if the handle is in a drawing state which means no drawable is being picked or located.
isPicking()
→ bool
Returns True if any drawable is being picked.
isLocating()
→ bool
Returns True if any drawable is being located.
isLocated(drawable_name)
→ bool
Returns True if a given drawable is located.
drawable_name
Name of the drawable to test.
isPicked(drawable_name)
→ bool
Returns True if a given drawable is picked.
drawable_name
Name of the drawable to test.
| See also |