I’m considering whether it’d be a good idea to introduce a new plug-in for newcomers to get familiar with Pyblish more quickly and to illustrate the need for the existing process in the first place - Selection, Validation, Extraction and Conform, or SVEC for short.
To provide for arbitrary plug-ins that does anything. They would reside at their own order, e.g.
1000 and get picked up regardless of prefix, e.g.
Plug-ins are typically intended for a particular purpose, such as validating or extracting. But simple plug-ins doesn’t have a particular purpose.
from maya import cmds import pyblish.api as pyblish class MyPlugin(pyblish.SimplePlugin): def process(self, context): cmds.file(exportSelected=True)
You’re welcome to create things here too.
from maya import cmds import pyblish.api as pyblish class MyPlugin(pyblish.SimplePlugin): def process(self, context): for x in range(10): cmds.createNode("mesh", name="myMesh%i" % x)
Note that they could only ever operate on the
Context, as no
Instance's have yet been created, which eliminates the possibility of making use of families.
Why would we want this?
Though the framework has been designed with SVEC in mind, it is capable of performing any arbitrary actions, the use of some may possibly stretch beyond our current understanding. It’s likely that without SVEC the framework would have been used in unforeseen ways that could ultimately be to it’s benefit.
On the other hand, publishing is abstract and lacks vocabulary. Which means it can be difficult to get things right and to find words to describe the complex processes it involves. SVEC provides this vocabulary and makes it possible to draw lines between orthogonal responsibilities and to make comparisons on a more granular level.
What would be the benefits of
- New users would not have to learn about SVEC before getting started with publishing
- Unforeseen use could ultimately benefit the growth of Pyblish and it’s community
- Help will be tricky to find and to provide as each plug-in becomes ad-hoc
- New users may be lead astray by not having anything to hold onto
From the get-go, it was my belief that SVEC captured every and all publishing needs one could ever want and I still believe that it is high-level enough to encompass even the most specific of needs.
Because of this, I suspect that if we do provide users with the amount of flexibility that
SimplePlugin offers, they are bound to land up with plug-in stack that in some form or another resembles SVEC, only they won’t know about it and thus can’t ask about it in the same structured manner.
One doesn’t necessarily exclude the other. Or does it?
I think we’ve already gotten a taste of that it can sometimes be difficult to get the responsibilities between the various SVEC plug-ins right, but we push through (hopefully) because we believe the separation is ultimately healthy and makes for more maintainable code.
With an option of going “the easy route”, this pushing might become less necessary and ultimately lead to a majority of plug-ins based on it due to “not having the time”.
On the other hand, with great power comes great responsibility. It’s up to us to decide whether this responsibility is for the better or worse for Pyblish and for the pipelines of studios in the longer run.