ui.py¶
User interface utilities for NodeWeaver.
This module provides utilities for managing Houdini's user interface elements and interactions. It focuses on providing consistent user feedback and handling common UI operations.
Functions:
Name | Description |
---|---|
warn_if_manual_mode |
Display warning if in manual update mode |
reload_node_shapes()
¶
Reload all node shapes in the current Network Editor pane.
Forces a refresh of all node shapes, in the Network Editor. This is useful after modifying node shapes as Node Weaver does.
Source code in utils/ui.py
warn_if_manual_mode(mode='simple', custom='')
¶
Check if Houdini is in manual mode and warn the user if it is.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
mode
|
str
|
Warning mode: "simple": Basic warning "errorfull": Full error message "errorpartial": Custom error with manual mode note |
'simple'
|
custom
|
str
|
Custom message to prepend to warning |
''
|
Returns:
Type | Description |
---|---|
bool
|
True if warning was displayed (manual mode active) |
Notes
- Checks current update mode setting
- Formats message appropriately
- Handles different warning types
- Returns whether warning was shown
Example
if warn_if_manual_mode("errorfull"): ... return # Operation cancelled due to manual mode
Since: 1.0.0