From dee4d18d6d9ddb479e037a19dd3748ef23795b60 Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Thu, 3 Nov 2022 12:12:44 +0100 Subject: [PATCH] OP-3908 - fix - use family to filter instances cached instances are dictionary where keys are creator identifier, eg family. --- openpype/hosts/photoshop/plugins/create/create_image.py | 2 +- openpype/hosts/photoshop/plugins/create/workfile_creator.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/openpype/hosts/photoshop/plugins/create/create_image.py b/openpype/hosts/photoshop/plugins/create/create_image.py index 4f8b227852..53ab5b92ca 100644 --- a/openpype/hosts/photoshop/plugins/create/create_image.py +++ b/openpype/hosts/photoshop/plugins/create/create_image.py @@ -23,7 +23,7 @@ class ImageCreator(Creator): instances = cache_and_get_instances(self, "openpype.photoshop.instances", self.host.list_instances) - for instance_data in instances: + for instance_data in instances.get(self.family, []): # legacy instances have family=='image' creator_id = (instance_data.get("creator_identifier") or instance_data.get("family")) diff --git a/openpype/hosts/photoshop/plugins/create/workfile_creator.py b/openpype/hosts/photoshop/plugins/create/workfile_creator.py index af84b5ab9e..4781244dcd 100644 --- a/openpype/hosts/photoshop/plugins/create/workfile_creator.py +++ b/openpype/hosts/photoshop/plugins/create/workfile_creator.py @@ -21,7 +21,7 @@ class PSWorkfileCreator(AutoCreator): instances = cache_and_get_instances(self, "openpype.photoshop.instances", self.host.list_instances) - for instance_data in instances: + for instance_data in instances.get(self.family, []): creator_id = instance_data.get("creator_identifier") if creator_id == self.identifier: subset_name = instance_data["subset"]