Just finished writing a first draft of support for making comments in Pyblish QML.
This PR enables the user to include a comment with his publish.
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
- Remember comment across resets
- Dedicated signal
commentedfor 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