Hi Jesse, So if I understand you right, you're looking for an alternative for presenting logger messages besides popups? And the script editor / nuke console isn't sufficient as it's hidden? I can't think of any other way to alert the comper (as Nuke has no status bar). You could have a python callback something in the node graph, such as have a backdrop with logs on it as a label, or something visual like that..
cheers, Jordan On Fri, Nov 1, 2013 at 8:00 AM, Jesse Kretschmer <je...@krets.com> wrote: > Heyo, > I've worked with Nuke for a while and I've realized the logging within > nuke is a bit nuanced. At my facility I implemented a global logger that > most of our tools use, including Nuke. In Maya, I swap the stream handler > with the maya.utils.MayaGuiLogHandler(). I have not come across a similar > handler for Nuke, so I wrote a simple custom logging handler. > > class NukeLogHandler(logging.Handler): > def emit(self, record): > if record.levelno >= logging.CRITICAL: > nuke.critical(record.getMessage()) > elif record.levelno >= logging.ERROR: > nuke.error(record.getMessage()) > elif record.levelno >= logging.WARNING: > nuke.warning(record.getMessage()) > else: > nuke.debug(record.getMessage()) > nuke.tprint("%s: %s" % (record.levelname,record.getMessage())) > > First I noticed that there is no nuke.info level to map to the standard > logging levels. I'd like to present errors and warnings to the user in a > nice way. Maya has a common method of bubbling these messages up that's not > intrusive, but nuke only seems to have nuke.critical() and nuke.message(). > Popups are so intrusive, that I'd like to find another way to handle > certain message. The command console prints information for these messages, > but that's often hidden beneath the main nuke window. > > Can anyone offer any suggestions to make this better? > > Cheers, > Jesse > > > > _______________________________________________ > Nuke-python mailing list > Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/ > http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python > >
_______________________________________________ Nuke-python mailing list Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/ http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python