photoshop plugins can use AYON settings

This commit is contained in:
Jakub Trllo 2024-02-09 13:07:00 +01:00
parent aac11597aa
commit 40a5b0e6d9
3 changed files with 3 additions and 17 deletions

View file

@ -42,7 +42,7 @@ class CollectColorCodedInstances(pyblish.api.ContextPlugin):
# flattened template cannot
subset_template_name = ""
create_flatten_image = "no"
flatten_subset_template = ""
flatten_product_name_template = ""
def process(self, context):
self.log.info("CollectColorCodedInstances")
@ -124,12 +124,12 @@ class CollectColorCodedInstances(pyblish.api.ContextPlugin):
if self.create_flatten_image != "no" and publishable_layers:
self.log.debug("create_flatten_image")
if not self.flatten_subset_template:
if not self.flatten_product_name_template:
self.log.warning("No template for flatten image")
return
fill_pairs.pop("layer")
subset = self.flatten_subset_template.format(
subset = self.flatten_product_name_template.format(
**prepare_template_data(fill_pairs))
first_layer = publishable_layers[0] # dummy layer

View file

@ -22,8 +22,6 @@ class CollectReview(pyblish.api.ContextPlugin):
hosts = ["photoshop"]
order = pyblish.api.CollectorOrder + 0.1
publish = True
def process(self, context):
for instance in context:
creator_attributes = instance.data["creator_attributes"]

View file

@ -808,18 +808,6 @@ def _convert_photoshop_project_settings(ayon_settings, output):
ayon_photoshop = ayon_settings["photoshop"]
_convert_host_imageio(ayon_photoshop)
ayon_publish_photoshop = ayon_photoshop["publish"]
ayon_colorcoded = ayon_publish_photoshop["CollectColorCodedInstances"]
if "flatten_product_type_template" in ayon_colorcoded:
ayon_colorcoded["flatten_subset_template"] = (
ayon_colorcoded.pop("flatten_product_type_template"))
collect_review = ayon_publish_photoshop["CollectReview"]
if "active" in collect_review:
collect_review["publish"] = collect_review.pop("active")
output["photoshop"] = ayon_photoshop