From ec47c7466fc4e133c0c776aea66b046576eef69f Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Tue, 21 Nov 2023 22:12:41 +0100 Subject: [PATCH] enhancing code --- .../plugins/publish/integrate_ftrack_instances.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/openpype/modules/ftrack/plugins/publish/integrate_ftrack_instances.py b/openpype/modules/ftrack/plugins/publish/integrate_ftrack_instances.py index fc97b2c516..5f70f5340b 100644 --- a/openpype/modules/ftrack/plugins/publish/integrate_ftrack_instances.py +++ b/openpype/modules/ftrack/plugins/publish/integrate_ftrack_instances.py @@ -126,19 +126,25 @@ class IntegrateFtrackInstance(pyblish.api.InstancePlugin): other_representations = [] has_movie_review = False for repre in instance_repres: - if "publish_on_farm" in repre.get("tags", []): - continue - self.log.debug("Representation {}".format(repre)) repre_tags = repre.get("tags") or [] + # exclude representations with are going to be published on farm + if "publish_on_farm" in repre_tags: + continue + + self.log.debug("Representation {}".format(repre)) + + # include only thumbnail representations if repre.get("thumbnail") or "thumbnail" in repre_tags: thumbnail_representations.append(repre) + # include only review representations elif "ftrackreview" in repre_tags: review_representations.append(repre) if self._is_repre_video(repre): has_movie_review = True else: + # include all other representations other_representations.append(repre) # Prepare ftrack locations