Inheritance |
|
hou.CompositorViewerEvent
objects are used with COPs Python states. Houdini calls event handlers with a dictionary that includes
useful data, such as a ui_event
key containing a CompositorViewerEvent
object.
You do not instantiate this type of object yourself. See Python states for more information.
hou.CompositorViewerEvent
is a specialized hou.UIEvent subclass that you can use to access ray coordinates and other event data within a compositor viewer.
Methods ¶
ray()
→ (origin_point, direction)
Not implemented
snappingRay()
→ dict
Not implemented
screenToRay(screen_x, screen_y)
→ (origin_point, direction)
Not implemented
screen_x
X coordinate in screen space relative to the view.
screen_y
Y coordinate in screen space relative to the view.
curViewport()
→ hou.Viewport2D
Returns the viewport this event occurred within.
mousePos(relative_to_viewport=False)
→ hou.Vector2
Return the mouse position for this event in screen coordinates. By default, the position is relative to the compositor view window.
relative_to_viewport
If False (default), the position is relative to the view window. If True, the position is relative to the viewport under the mouse.
Methods from hou.UIEvent ¶
device()
→ hou.UIEventDevice
Returns an object containing input-device-specific event data.
For example, if this is a mouse click event, you can use event.device().mouseX()
to get the X coordinate in screen space, and event.device().isLeftButton()
to check whether the left mouse button was pressed.
if ui_event.device().isLeftButton(): ...
hasQueuedEvents()
→ bool
Returns true if this event contains queued device events.
queuedEvents()
→ list
of hou.UIEventDevice
If hou.UIEvent.hasQueuedEvents returns True, this method returns the list of queued input device events.
value()
→ obj
Returns the value
payload of this event. You can tell the type of this value by calling hou.UIEvent.valueType.
valueType()
→ hou.uiEventValueType
Returns an enum value corresponding to the event value’s type, or hou.uiEventValueType.NoType
if the event contains no single scalar value.
reason()
→ hou.uiEventReason
For events related to state changes, returns an enum value representing the type of state change that triggered the event.
See also |