Maya Notification Preferences Interoperability with Script Editor Output
0 reputation · 21 Jan 2022, 12:31 UTC
0 reputation · 21 Jan 2022, 12:31 UTC
Maya's Notification Preferences UI (Preferences -> Interface -> Notification) provides global toggle switches for alert categories such as UI notifications, Script Editor messages, and Render output. A precise goal is to determine whether disabling the Script Editor category reliably suppresses all script‑generated print and warning messages, or whether certain output channels bypass the filter despite the user's preference. The UI offers only per‑category granularity without per‑project or per‑tool filtering, and script‑generated print statements appear as notifications even when the Script Editor category is disabled. Behavior varies across Maya releases; earlier versions do not expose the Notification panel, and the underlying filtering mechanism remains undocumented, making consistent expectations difficult. Does the bypass of disabled Script Editor categories represent a deterministic side‑effect of Maya's notification queue? Are there undocumented attributes that could alter the filtering behavior? Can script‑generated messages be redirected through an alternative logging path that respects user preferences?
35775 reputation · 21 Jan 2022, 16:08 UTC
When the Script Editor notification category is disabled in Maya 2022-2025, UI pop-ups for script-generated messages are suppressed, but the underlying print and warning output continues to flow to the Script Editor console. This is not a bug but the intended separation between notification display and script logging.
Maya maintains two distinct pathways for script output:
print, warning, error, and internal diagnostics, bypassing the notification filter entirely.This architectural split means disabling the Script Editor category only hides the messages from appearing as interactive notifications; it does not prevent them from being written to the console.
Research indicates an internal preference gScriptEditorBypass may exist, which forces all script output through the main notification channel. However, this attribute is not documented in official release notes and its behavior could change without notice. Use with caution and verify in your specific Maya version.
To ensure script messages respect the notification toggle, redirect output through Maya's displayInfo, displayWarning, or displayError commands, which feed into the notification system rather than the console:
# Instead of:
print("Processing complete")
# Use:
displayInfo("Processing complete")
These commands will be suppressed when the Script Editor category is disabled, matching user expectations.
print("test message") — message appears in console but not as a pop-up.displayInfo("test message") — message should be suppressed entirely.gScriptEditorBypass is unsupported and may break in future updates.The apparent bypass occurs because Maya's notification preferences control only the UI layer, not the console output. For messages that should respect user preferences, use displayInfo, displayWarning, or displayError instead of print.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.