-
Notifications
You must be signed in to change notification settings - Fork 59
Description
Issue
I'm in the process of setting up a Publishing workflow where some instances will spawn "dependent publishes" if they are set to publish in the current run, e.g. the user did not disable them in the Pyblish UI. More info on what I'm trying to achieve can be found in this Avalon + USD + Pyblish discussion.
We've recently started looking into adopting Houdini 18 Solaris with USD inside Avalon and are making good progress. Currently we have a good view of how we want to structure assets and shots with a lot of information gained from this Generating Assets and Shots in USD (Pipeline) topic.
Use case
- We have a couple of model variations the User may want to publish. These are now showing as our Publish instances.
- Whenever any Model variation instance was active when the user starts the Publish two dependent "publishes" should be created to, specifically a master
usdModelandusdShade. - Whenever any
usdModelfile is to be generated it should also bootstrap anusdAssetfile whenever theusdAssetfile does not exist yet.
The crucial point is that these dependencies are versioned seperately and turn into their own subset.
So e.g.
- Artist generated model variation
usdModel_damaged - This means master
usdModelandusdShadewill need to be updated in their respective subset and versions. - If
usdAssetdoes not exist yet (e.g. this is firstusdModelever) then also generateusdAssetsubsetv001.
I've found it particularly hard to make these dependencies simple to write and debug inside Pyblish and Avalon. This commit has the crucial bits of my current "quick 'n' dirty" draft.
As such, after the instances are collected and the user made his pick as to what to publish then when the user clicks validate or publish the dependent instances get created. However, currently these will not themselves have their relevant plug-ins loaded for their family. This is currently due to how after Collecting the irrelevant Plug-ins are removed. For example this second Validator will never trigger:
class CreateDependencies(pyblish.api.ContextPlugin):
order = pyblish.api.ValidatorOrder - 0.4
def process(self, context):
instance = context.create_instance("dependency")
instance.data["family"] = "dependency"
class ValidateDependencies(pyblish.api.InstancePlugin):
order = pyblish.api.ValidatorOrder
families = ["dependency"]
def process(self, instance):
# Never runs...
self.log.info("Running dependency")This means I cannot add new instances or alter the instances after the User's publishing choices are well defined. Because I can't add it in-between Collecting and Validating.
Changing CVEI?
In the discussion I opted for maybe adding an additional step to CVEI, specifically:
- Initialize - find and create the Instances for the user to interact with, only with essential information to allow the user to check the contents.
- Collect - collect any additional data needed for validation, extraction and integration. Including the potential adding of automated dependent instances.
- Validate - validate all the existing instances
- Extract - output the publish instances.
- Integrate - push the extracted data into the correct location on disk and into your production database.
A user would then be able to "change what instances to trigger" (e.g. through Pyblish QML) at the end of Initialize (1). Then on Validate or Publish the publishing will continue onwards through respectively 2-3 or 2-5. The difference in behavior would then be after Collect (2) that all plugins are still checked whether they should be run for the potentially new or changes families.
I would love to see a way where I can trivially add instances as dependencies after the user initiated the publish choices and still allow them to be shown individually to the user as a result. This would then also allow to debug those dependent publishes right in the Pyblish User Interfaces.
This is somewhat related to #346 due to the allowing the Initialize step to become solely the "list which instances are available to publish" and all the post collecting of data to be done in then step two: Collect.