diff --git a/pype/plugins/global/publish/submit_publish_job.py b/pype/plugins/global/publish/submit_publish_job.py index bc644987de..77a8816117 100644 --- a/pype/plugins/global/publish/submit_publish_job.py +++ b/pype/plugins/global/publish/submit_publish_job.py @@ -133,7 +133,9 @@ class ProcessSubmittedJobOnFarm(pyblish.api.InstancePlugin): families = ["render.farm", "prerener", "renderlayer", "imagesequence", "vrayscene"] - aov_filter = {"maya": ["beauty"]} + aov_filter = {"maya": [r".+(?:\.|_)([Bb]eauty)(?:\.|_).*"], + "aftereffects": [r".*"], # for everything from AE + "celaction": [r".*"]} enviro_filter = [ "FTRACK_API_USER", @@ -447,8 +449,13 @@ class ProcessSubmittedJobOnFarm(pyblish.api.InstancePlugin): preview = False if app in self.aov_filter.keys(): - if aov in self.aov_filter[app]: - preview = True + for aov_pattern in self.aov_filter[app]: + if re.match( + aov_pattern, + aov + ): + preview = True + break new_instance = copy(instance_data) new_instance["subset"] = subset_name @@ -513,29 +520,26 @@ class ProcessSubmittedJobOnFarm(pyblish.api.InstancePlugin): collections, remainders = clique.assemble(exp_files) bake_render_path = instance.get("bakeRenderPath", []) + print('@@@@ collections {}'.format(collections)) # create representation for every collected sequence for collection in collections: ext = collection.tail.lstrip(".") preview = False # if filtered aov name is found in filename, toggle it for # preview video rendering - for app in self.aov_filter: + for app in self.aov_filter.keys(): if os.environ.get("AVALON_APP", "") == app: for aov in self.aov_filter[app]: if re.match( - r".+(?:\.|_)({})(?:\.|_).*".format(aov), + aov, list(collection)[0] ): preview = True break - break if bake_render_path: preview = False - if "celaction" in pyblish.api.registered_hosts(): - preview = True - staging = os.path.dirname(list(collection)[0]) success, rootless_staging_dir = ( self.anatomy.find_root_template_from_path(staging)