@mottosso mottosso released this May 25, 2017 · 226 commits to master since this release

Assets 2

Support for comments!

  • Original issue: #9



Comments made via the editor is stored in the comment data member of the context, as a single block of text.

context.data["comment"] = "Summary goes here\nDescription goes here, on a new line"

This is similar to comments on Git commits, the first line being dedicated to a short "summary" of your overall commit, with an (optional) longer description.

You can just add a summary, just add a description, or both. The first line always results in the first line of your comment.


  • Automatically show comment on presence of context.data["comment"]
  • Remember comment across resets
  • Dedicated signal commented for optional data persistence
  • Maximisable, type out your excellent comment in fullscreen
  • Comment template, provide users with a starting point of guidelines for their comment.



A signal is emitted when entering a comment, so as to support data persistence, e.g. in Maya or on disk.

from pyblish import api

def persist(comment):
   # write to disk here

api.register_callback("commented", persist)

The comment can then be read via e.g. a Collector into the Context which would then become visible in the GUI.

from pyblish import api

class CollectComment(api.ContextPlugin):
  order = api.CollectorOrder

  def process(self, context):
    context.data["comment"] = # read from disk here