From c2ffeb89538dc0fe845a98e78ec7ad34858ff7ce Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Tue, 27 Jul 2021 11:30:12 +0200 Subject: [PATCH] Textures publishing - tweaked validator Look for resources (secondary workfiles) only for main workfile. --- .../plugins/publish/validate_texture_workfiles.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/openpype/hosts/standalonepublisher/plugins/publish/validate_texture_workfiles.py b/openpype/hosts/standalonepublisher/plugins/publish/validate_texture_workfiles.py index 189246144d..aa3aad71db 100644 --- a/openpype/hosts/standalonepublisher/plugins/publish/validate_texture_workfiles.py +++ b/openpype/hosts/standalonepublisher/plugins/publish/validate_texture_workfiles.py @@ -14,8 +14,16 @@ class ValidateTextureBatchWorkfiles(pyblish.api.InstancePlugin): families = ["workfile"] optional = True + # from presets + main_workfile_extensions = ['mra'] + def process(self, instance): if instance.data["family"] == "workfile": - msg = "No resources for workfile {}".\ + ext = instance.data["representations"][0]["ext"] + if ext not in self.main_workfile_extensions: + self.log.warning("Only secondary workfile present!") + return + + msg = "No secondary workfiles present for workfile {}".\ format(instance.data["name"]) assert instance.data.get("resources"), msg