After a long time i back to ask a question.
My problem here is that we have two step publishing with pyblish, from wip to publish folder that give the file version, date, and name of author, after that supervisor will open the first level published file and check it and again will publish in final folder.
now i want to change it to one step for supervisors, it means that when supervisor opened the wip version of file he can publish it in one step but into two place.
now i want to know that can i hide an integrator or validator or extractor from pyblish gui with having a series of conditions on families?
it means, based on some conditions, can i change families in the body of my plugin?
here, for example, i have a collector that will text that a user can save a file in final folder or not (he is supervisor or not), then based on it will save a data in context (context.data[“fullPermission”].
i want to know that can i access to the data inside my plugin, and outside of process method?
import pyblish.api class CollectPermissionNew(pyblish.api.ContextPlugin): '''''' order = pyblish.api.CollectorOrder hosts = ["maya"] label = "Collect Permission" def process(self, context): context.data['fullPermission'] = False # context.data['fullPermission'] = True self.log.info('fullPermission: %s' % context.data['fullPermission'])
import pyblish.api class ValidateTestCollectorNew(pyblish.api.InstancePlugin): '''''' order = pyblish.api.ValidatorOrder if context.data['fullPermission']: families = ['anr2.model', 'anr2.model.final'] else: families =  hosts = ['maya'] optional = True version = (0, 0, 1) label = "++TEST++" def process(self, instance): self.log.info('Processing...')
this snippet does not work
if context.data['fullPermission']: families = ['anr2.model', 'anr2.model.final'] else: families = 
because we can’t access to
context.data["..."] in body of plugin.
do you think there is a way to do that and can change families??