Simplify debugging by outputting more information on demand.
Interface
from pyblish import util
util.publish()
Outputs
Log messages, of all kinds
Exceptions
Developer Hint
Here's some tips for those interested in giving this a go.
The util.publish() function is more or less a for-loop.
for plugin in plugins:
for instance in context:
plugin.process(instance)
Granted, this is somewhat simplified when you take into consideration that some plug-ins only apply to some instances based on criteria such as their families. But beyond that, it's a loop.
To output more data from this function, what you would need to do is somehow print or log messages from within this loop.
for plugin in plugins:
for instance in context:
result = plugin.process(instance)
print("{plugin} ran with error: {error}".format(**result))
This, along with any other information you can think of, must then be if-statemented to only trigger when the user passes verbose=True to the function.
def publish(..., verbose=False):
if verbose:
print("Verbose information")
Goal
Simplify debugging by outputting more information on demand.
Interface
Outputs
Developer Hint
Here's some tips for those interested in giving this a go.
The
util.publish()
function is more or less a for-loop.Granted, this is somewhat simplified when you take into consideration that some plug-ins only apply to some instances based on criteria such as their families. But beyond that, it's a loop.
To output more data from this function, what you would need to do is somehow print or log messages from within this loop.
This, along with any other information you can think of, must then be if-statemented to only trigger when the user passes
verbose=True
to the function.Good luck!