To be able to inject the instance argument to Actions and get the relevant instances.
Currently you have to repeat a lot of code to get the relevant instances. Example to get the failed instances:
label = "Print Failed Instance"
on = "failed"
def process(self, context):
# get all failed instances
failed = list()
for result in context.data["results"]:
if result["error"] is not None:
if result["instance"] not in failed:
for instance in failed:
# context seem to return None
if not instance:
# filter to family specific instance
if instance.data['family'] != 'texture':
You already specify what statuses of instances the action should operate on, from the
on property ei.
You also know the families of instances, which is coming from the plugin executing the action.
With the status and family of the instance, we should be able to find the correct instances to operate on, Unless I'm missing something?