From 540ca309f2563a71486419b13908f3796b8a83e2 Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Tue, 30 Mar 2021 17:41:34 +0200 Subject: [PATCH] Fix - handle duplication of Task name If Task name is explicitly set in template, it duplicated it. Task name doesnt need to be in template, but by standard it should be in subset name. This whole replace situation is because of avalon's Creator which modify subset name even if it shouldn't. If Creator app is reworked (could have wide impact!), this should be cleaned up. --- pype/plugins/harmony/publish/collect_farm_render.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/pype/plugins/harmony/publish/collect_farm_render.py b/pype/plugins/harmony/publish/collect_farm_render.py index 98706ad951a..c283b7f8da4 100644 --- a/pype/plugins/harmony/publish/collect_farm_render.py +++ b/pype/plugins/harmony/publish/collect_farm_render.py @@ -124,10 +124,16 @@ def get_instances(self, context): # TODO: handle pixel aspect and frame step # TODO: set Deadline stuff (pools, priority, etc. by presets) # because of using 'renderFarm' as a family, replace 'Farm' with - # capitalized task name - subset_name = node.split("/")[1].replace( + # capitalized task name - issue of avalon-core Creator app + subset_name = node.split("/")[1] + task_name = context.data["anatomyData"]["task"].capitalize() + replace_str = "" + if task_name.lower() not in subset_name.lower(): + replace_str = task_name + subset_name = subset_name.replace( 'Farm', - context.data["anatomyData"]["task"].capitalize()) + replace_str) + render_instance = HarmonyRenderInstance( version=version, time=api.time(),