On this page | |
Inheritance |
|
Overview ¶
A hou.ViewerStateContext
holds the contextual information related to the running viewer state such as
the gadget drawable bindings.
¶
Methods from hou.GadgetContext ¶
gadget()
→ string
Returns the name of the active gadget drawable. A gadget is active when it is picked or when the mouse moves over the gadget geometry (located).
gadgetLabel()
→ string
The active gadget label name.
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.
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.
isDrawing()
→ bool
Returns True if the handle is in a drawing state which means no gadget is being picked or located.
isPicking()
→ bool
Returns True if any gadget is being picked.
isLocating()
→ bool
Returns True if any gadget is being located.
isLocated(gadget_name)
→ bool
Returns True if a given gadget is located.
gadget_name
Name of the gadget to test.
isPicked(gadget_name)
→ bool
Returns True if a given gadget is picked.
gadget_name
Name of the gadget to test.
See also |