Allow disabling of printing to console via settings (or env var)

This commit is contained in:
Roy Nieterau 2022-02-04 09:32:31 +01:00
parent 3584f2d9b7
commit f13c83eb5e
2 changed files with 6 additions and 3 deletions

View file

@ -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)

View file

@ -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"