Goal
Facilitate the use of external plug-in(s) in existing publishing pipeline.
Motivation
Installing someone else’s plug-ins currently requires you to architect your content according to the families provided by those plug-ins.
That’s fine, assuming this is the first and only series of plug-in you install and that you start from scratch.
But what if you already have a series of plug-ins and things are working well? You are just interested in appending a few from an external source that help with one or more issues?
Well, with this you can.
Usage example
- Install new validator, with support for
familyX
- Append
familyX
to relevant instances in your Collector.
Or better yet, have your collector remain general enough to derive familyX
from the content somehow, such as picking it up from a user-defined attribute in Maya; as in Magenta.
Implementation
An implementation is fairly straightforward, an Instance is already capable of hosting arbitrary data so we’ll add to that.
instance.data["families"] = ["geometry", "human", "primary"]
The mechanism currently in charge of determining compatibility between plug-in and instance is called instances_by_plugin and will be augmented to also consider the new families
data entry.
For backwards compatibility, the current family
will remain and involves no overhead and little cost to maintenance (about 4 lines of code at a near location).
Discussion
This is a feature that changes some major ways of thinking about how to orchestrate many plug-ins. But @BigRoy pointed out some concrete flaws in the current system of a singular family which basically boils down to an inability to make use of Magenta without making large changes to an existing eco-system of both plug-ins and how content is created.
It’s possible that this feature can eliminate that concern, that all one has to do to work with an external plug-in/series of plug-ins is to simply append, or “tag” instances with the additional families that it could relate to and have the corresponding plug-ins trigger.
What do you think, does this make Pyblish a stronger (more powerful) or weaker (less focused) framework?