Set Viewport Mode (BETA)
Sets the mode of a specified viewport window to ‘Scripted’ mode or ‘Default’ mode when executed. ‘Scripted’ mode disables default viewport interaction and enables placing UI elements over the viewport. ‘Default’ mode is the default state of the viewport, and entering it will destroy any UI elements on the viewport. Executing with ‘Enable Viewport Mouse Events’ set to true in ‘Scripted’ mode is required to allow the specified viewport to be targeted by viewport mouse event nodes, including ‘On Viewport Dragged’ and ‘Read Viewport Drag State’. Executing with ‘Enable Picking’ set to true in ‘Scripted’ mode is required to allow the specified viewport to be targeted by the ‘On Picked’ and ‘Read Pick State’ nodes.
Installation
To use this Node, you must enable omni.graph.ui_nodes
in the Extension Manager.
Inputs
Name |
Type |
Description |
Default |
---|---|---|---|
execIn |
|
Input execution |
|
Mode (mode) |
|
The mode to set the specified viewport to when this node is executed (0: ‘Default’, 1: ‘Scripted’) |
0 |
Enable Viewport Mouse Events (enableViewportMouseEvents) |
|
Enable/Disable viewport mouse events on the specified viewport when in ‘Scripted’ mode |
False |
Enable Picking (enablePicking) |
|
Enable/Disable picking prims in the specified viewport when in ‘Scripted’ mode |
False |
Viewport (viewport) |
|
Name of the viewport window to set the mode of |
Viewport |
Outputs
Name |
Type |
Description |
Default |
---|---|---|---|
Default Mode (defaultMode) |
|
Fires when this node is successfully executed with ‘Mode’ set to ‘Default’ |
|
Scripted Mode (scriptedMode) |
|
Fires when this node is successfully executed with ‘Mode’ set to ‘Scripted’ |
|
Widget Path (widgetPath) |
|
When the viewport enters ‘Scripted’ mode, a container widget is created under which other UI may be parented. This attribute provides the absolute path to that widget, which can be used as the ‘parentWidgetPath’ input to various UI nodes, such as Button. When the viewport exits ‘Scripted’ mode, the container widget and all the UI within it will be destroyed. |