I think we had a discussion about whether to have context as an argument when processing the instance, and the conclusion was that you should have it as an argument instead of accessing it through the instance; instance.context.
Accessing the context through the instance would solve this problem.
The problem is probably from Pyblish itself, either here in the current pyblish-win release (1.2) or here for the current latest. This function decides what plug-ins are compatible with a given instance.
When it comes to bugs, and you aren’t using the current release, it’s better to talk about it outside of the forums, as they might apply only to you and only in this particular instance. That is, the information provided to fix the issue might not apply in the next release. A good place it on Gitter.
It’s worth having a look in the current release when you encounter a bug, to see if it’s new. It’ll narrow down the search as well.
And just so it’s obvious; it is recommended that you work with the versions released in pyblish-win or pyblish-x. They’re the stable release. It makes it easier and more centralised to handle bug reports such as these.
I seem to have a related issue her, which actually breaks our workflow completely in the 1.2.6.
I have a collector that runs on an instance and context. It’s offset to the end of collectors queue to make sure instances already exists. It adds data to the instances based on their families or task type we’re in.
After the update it shows among the collectors, however it doesn’t run, hence much needed data doesn’t get attached to the instances. It’s a simple plugin that can be distilled to this
""" Adds ftrack asset information to the instance
order = pyblish.api.Collector.order + 0.41
label = 'Asset Attributes'
def process(self, instance, context):
# skipping instance if ftrackData isn't present
if not context.has_data('ftrackData'):
self.log.info('No ftrackData present. Skipping this instance')
# skipping instance if ftrackComponents isn't present
if not instance.has_data('ftrackComponents'):
self.log.info('No ftrackComponents present. Skipping this instance')
ftrack_data = context.data['ftrackData'].copy()
instance.data['ftrackAssetName'] = ftrack_data['Task']['name']
task_type = ftrack_data['Task']['type'].lower()
# task type filtering
if task_type == 'lighting':
asset_type = 'render'
if task_type == 'compositing':
asset_type = 'img'
# family filtering
if 'camera' in instance.data['family']:
asset_type = 'cam'
instance.data['ftrackAssetType'] = asset_type
It just shows as white in the collectors whatever I do to it. I tried pulling context directly from instance, but that didn’t work either.
The reproducible example at the start of this topic runs correctly in 1.3.2. The Validator only shows when a family is present of otherFamily, otherwise it is ignored. As such in that exact example the Validator is skipped/ignored as opposed to its original behavior where they “wrongly” were displayed.