getavalon / core

The safe post-production pipeline - https://getavalon.github.io/2.0
MIT License
218 stars 49 forks source link

Improve GUI status prompting mechanism #435

Open davidlatwe opened 5 years ago

davidlatwe commented 5 years ago

Problem

I found that Avalon's GUI tools use a common widget function called echo to prompt status messages, some of them were able to show on widget, some of them were print out only. I think this could be improved.

Propose

Use logging to pipe status logs into a custom status line widget.

statusline

By connecting Logger, we could prompt log message from anywhere to not only console but also GUI.

Full code for demo

NOTE: The implementation above, will not show messages in status line if log level is lower then previous message that was higher then logging.WARNING.

BigRoy commented 5 years ago

Could this also allow to expand and see the full log history in something like Maya's script editor? So we create our own window to show that.

davidlatwe commented 5 years ago

Yeah, if we also pipe logs into a log file, or just keeping them in memory, could do !

mottosso commented 5 years ago

Very nice. Could be a good starting point for shared widgets.

davidlatwe commented 5 years ago

Could this also allow to expand and see the full log history in something like Maya's script editor?

About full log history, which one would be better for this ? A tree view widget like the one in pyblish-qml or lite that you could filter out logs by level and even sorting them, or just plain text like Maya script editor ?