MouseEvent.kl

Types

MouseEvent (object)

バージョン 1.12.0 で追加.

MouseEvent object used to propagate mouse events into the Manipulation system.

A given MouseEvent object may be generated for a wide range of mouse events in the host application. The event type should always be checked for the exact type of the event. e.g. MouseEnter and MouseLeave are sent to the system as moue events from Maya and SoftImage. The mouse position is not valid in these 2 cases. In Qt 5 based applications, the MouseEnter event can be populated using the mouse position and other data.

参考

BaseEvent

Members

Host host The Host object providing a method to query data about the host and propagate data back to the host.
Viewport_Virtual viewport The viewport that was in focus when the event was generated.
EventType eventType The id specifying the type of event.
Boolean accepted A boolean flag indicating that the event has been accepted, and no should not be handled by other handlers or the host DCC application.
Boolean redrawAllViewportsIfAccepted A boolean flag indicating if all viewports must be redrawn. If false, only event’s viewport must be redrawn.
ModiferKey modifiers The keyboard modifier keys that were held when the event occurred.
String dfgToolPath Path of the DFG node containing the tool. Uses to propagate the manipulated value throuht ports.
MouseButton button The button that caused the event.
MouseButton buttons The button state when the event was generated. The button state is a combination of MouseButton_LeftButton, MouseButton_RightButton, MouseButton_MidButton using the OR operator. For mouse move events, this is all buttons that are pressed down. For mouse press and double click events this includes the button that caused the event. For mouse release events this excludes the button that caused the event.
Vec2 pos The cursor position in pixels, relative to the viewport that received the event.

Methods

  MouseEvent ( in EventType eventType, in ModiferKey modifiers, in MouseButton button, in MouseButton buttons, in Vec2 pos, in Viewport_Virtual viewport )
  MouseEvent ( in MouseEvent other )
  MouseEvent ()
MouseEvent clone ? ()
Vec3 getNormalizedCoords ? ()