From f13c83eb5e0f2c49d272bb3c7310711db6d184a4 Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Fri, 4 Feb 2022 09:32:31 +0100 Subject: [PATCH] Allow disabling of printing to console via settings (or env var) --- openpype/tools/pyblish_pype/settings.py | 3 +++ openpype/tools/pyblish_pype/window.py | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/openpype/tools/pyblish_pype/settings.py b/openpype/tools/pyblish_pype/settings.py index 11539f67a6..aaa35d0b56 100644 --- a/openpype/tools/pyblish_pype/settings.py +++ b/openpype/tools/pyblish_pype/settings.py @@ -25,3 +25,6 @@ TerminalFilters = { # Allow animations in GUI Animated = env_variable_to_bool("OPENPYPE_PYBLISH_ANIMATED", True) + +# Print UI info message to console +PrintInfo = env_variable_to_bool("OPENPYPE_PYBLISH_PRINT_INFO", True) diff --git a/openpype/tools/pyblish_pype/window.py b/openpype/tools/pyblish_pype/window.py index 3f9cd17deb..7bb11745d6 100644 --- a/openpype/tools/pyblish_pype/window.py +++ b/openpype/tools/pyblish_pype/window.py @@ -1305,9 +1305,9 @@ class Window(QtWidgets.QDialog): self.animation_info_msg.stop() self.animation_info_msg.start() - # TODO(marcus): Should this be configurable? Do we want - # the shell to fill up with these messages? - util.u_print(message) + if settings.PrintInfo: + # Print message to console + util.u_print(message) def warning(self, message): """Block processing and print warning until user hits "Continue"