OmniGraph Node omni.graph.ui.SetViewportMode¶
omni.graph.ui.SetViewportMode Properties¶
Name |
Value |
---|---|
Version |
1 |
Extension |
omni.graph.ui |
Has State? |
False |
Implementation Language |
Python |
Default Memory Type |
cpu |
Generated Code Exclusions |
None |
uiName |
Set Viewport Mode (BETA) |
__categories |
graph:action,ui |
__language |
Python |
Generated Class Name |
OgnSetViewportModeDatabase |
Python Module |
omni.graph.ui |
omni.graph.ui.SetViewportMode Description¶
- 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.
omni.graph.ui.SetViewportMode Inputs¶
Name |
Type |
Default |
Required? |
Descripton |
---|---|---|---|---|
inputs:enablePicking |
bool |
False |
Y |
Enable/Disable picking prims in the specified viewport when in ‘Scripted’ mode |
uiName |
Enable Picking |
|||
__default |
false |
|||
inputs:enableViewportMouseEvents |
bool |
False |
Y |
Enable/Disable viewport mouse events on the specified viewport when in ‘Scripted’ mode |
uiName |
Enable Viewport Mouse Events |
|||
__default |
false |
|||
inputs:execIn |
execution |
None |
Y |
Input execution |
inputs:mode |
int |
0 |
Y |
The mode to set the specified viewport to when this node is executed (0: ‘Default’, 1: ‘Scripted’) |
uiName |
Mode |
|||
__default |
0 |
|||
inputs:viewport |
token |
Viewport |
Y |
Name of the viewport window to set the mode of |
uiName |
Viewport |
|||
__default |
“Viewport” |
omni.graph.ui.SetViewportMode Outputs¶
Name |
Type |
Default |
Required? |
Descripton |
---|---|---|---|---|
outputs:defaultMode |
execution |
None |
Y |
Fires when this node is successfully executed with ‘Mode’ set to ‘Default’ |
uiName |
Default Mode |
|||
outputs:scriptedMode |
execution |
None |
Y |
Fires when this node is successfully executed with ‘Mode’ set to ‘Scripted’ |
uiName |
Scripted Mode |
|||
outputs:widgetPath |
token |
None |
Y |
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. |
uiName |
Widget Path |