allow for aov_filter preset override

This commit is contained in:
Milan Kolar 2020-02-10 19:41:51 +01:00
parent 8cbf3943c8
commit 1cdc959551

View file

@ -148,7 +148,7 @@ class ProcessSubmittedJobOnFarm(pyblish.api.InstancePlugin):
families = ["render.farm", "renderlayer", "imagesequence"] families = ["render.farm", "renderlayer", "imagesequence"]
aov_filter = [AOVFilter("maya", ["beauty"])] aov_filter = {"maya": ["beauty"]}
enviro_filter = [ enviro_filter = [
"PATH", "PATH",
@ -307,9 +307,9 @@ class ProcessSubmittedJobOnFarm(pyblish.api.InstancePlugin):
preview = False preview = False
# if filtered aov name is found in filename, toggle it for # if filtered aov name is found in filename, toggle it for
# preview video renderin # preview video renderin
for filter in self.aov_filter: for app in self.aov_filter:
if os.environ.get("AVALON_APP", "") == filter.app: if os.environ.get("AVALON_APP", "") == app:
for aov in filter.aov: for aov in self.aov_filter[app]:
if re.match( if re.match(
r".+(?:\.|_)({})(?:\.|_).*".format(aov), r".+(?:\.|_)({})(?:\.|_).*".format(aov),
list(c)[0] list(c)[0]