I have a function that receives the plugin and instance back from a callback. I want to check if my instance just ran in a validation plugin.
I looked at the api and there doesn’t seem to be any mention of a convenience function for this. Though I know internally pyblish uses
Since this is not mentioned in the api I take it to be private to the package.
Could I request either we make this public, perhaps accessible through the utils module?
or add something like:
def get_cevi_order(order): return next((aOrder for aOrder in [api.CollectorOrder, api.ValidatorOrder, api.ExtractorOrder, api.IntegratorOrder] if lib.inrange(aOrder, order)),None)
which would then be used something like:
if pyblish.api.ValidatorOrder == pyblish.util.get_cevi_order(plugin.order): #do stuff
perhaps that over complicating things and I could simply use
if pyblish.api.ValidatorOrder == round(plugin.order): #do stuff