| 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
入力デバイス特有のイベントデータを含んだオブジェクトを返します。
例えば、これがマウスクリックイベントの場合、event.device().mouseX()を使用することでスクリーン空間内のX座標を取得することができ、
event.device().isLeftButton()を使用することで左マウスボタンが押されたかどうかをチェックすることができます。
if ui_event.device().isLeftButton(): ...
hasQueuedEvents()
→ bool
このイベントにキュー待ちのデバイスイベントが含まれていればTrueを返します。
queuedEvents()
→ list
of hou.UIEventDevice
hou.UIEvent.hasQueuedEventsがTrueを返す場合、このメソッドは、キュー待ちの入力デバイスイベントのリストを返します。
value()
→ obj
このイベントの値のペイロード(ヘッダを除いだデータ)を返します。
hou.UIEvent.valueTypeをコールすることで、この値のタイプを取得することができます。
valueType()
→ hou.uiEventValueType
このイベント値のタイプに呼応した列挙値を返します。
このイベントに何も単一スカラー値が含まれていなければhou.uiEventValueType.NoTypeを返します。
reason()
→ hou.uiEventReason
ステートに関連したイベントが変わると、そのイベントをトリガーしたステート変更のタイプを表現した列挙値を返します。
| See also |