Shotgun Publisher Desktop -- overriding dialog messages

I have a condition within the desktop publisher that I want to flag as a warning on the dialog but not to prevent publishing when the user clicks Validate.

Is there a way to send messages via the self._progress_handler logger in dialog.py from the context of the publish_file module?

Thanks!

4 Likes

Hello, and welcome to the forums!

I thought there was a way to do this, but I’m not able to find it in the docs. I’m going to run your question by the team; I’ll let you know what I find.

1 Like

Hi!
You can log messages to the progress details view at any time from the collector and your publish items. Both of them have a logger property that will send messages directly to the publisher’s progress details view. The logger object is a standard Python logger from the logging module

You can also add callbacks on your log output that can be invoked from buttons in the logs view. You can read more about it here

Here’s what it looks like after I press the validate button in the progress details view.

And there’s what it looks like after publishing.

As you can see, you are free to log from anywhere. There is one caveat however. The warnings will only show on the details page and not the main publisher page. This is what the publisher looks like just after I press validate.

Cheers,

JF

3 Likes

Thanks for the answer. Of course since this is artist-facing, not many of them know or care about the details page. It needs to be as obvious as possible.

2 Likes

Yeah I can understand that, things can get a bit lost in that view. I’d recommend popping in a feature request if you have time:

2 Likes