rename 'subsetGroup' > 'productGroup'

This commit is contained in:
Jakub Trllo 2024-03-05 14:09:34 +01:00
parent 3ba6edc483
commit 805c199614
5 changed files with 16 additions and 16 deletions

View file

@ -89,7 +89,7 @@ class CollectInstancesUsdLayered(pyblish.api.ContextPlugin):
# For now group ALL of them into USD Layer product group # For now group ALL of them into USD Layer product group
# Allow this product to be grouped into a USD Layer on creation # Allow this product to be grouped into a USD Layer on creation
data["subsetGroup"] = "USD Layer" data["productGroup"] = "USD Layer"
instances = list() instances = list()
dependencies = [] dependencies = []

View file

@ -64,4 +64,4 @@ class CollectUsdLayers(pyblish.api.InstancePlugin):
layer_inst.append((layer, save_path)) layer_inst.append((layer, save_path))
# Allow this product to be grouped into a USD Layer on creation # Allow this product to be grouped into a USD Layer on creation
layer_inst.data["subsetGroup"] = "USD Layer" layer_inst.data["productGroup"] = "USD Layer"

View file

@ -132,7 +132,7 @@ class CollectTextureSet(pyblish.api.InstancePlugin):
image_instance.data["representations"] = [representation] image_instance.data["representations"] = [representation]
# Group the textures together in the loader # Group the textures together in the loader
image_instance.data["subsetGroup"] = image_product_name image_instance.data["productGroup"] = image_product_name
# Store the texture set name and stack name on the instance # Store the texture set name and stack name on the instance
image_instance.data["textureSetName"] = texture_set_name image_instance.data["textureSetName"] = texture_set_name

View file

@ -428,14 +428,14 @@ class IntegrateAsset(pyblish.api.InstancePlugin):
"families": get_instance_families(instance) "families": get_instance_families(instance)
} }
subset_group = instance.data.get("subsetGroup") subset_group = instance.data.get("productGroup")
if subset_group: if subset_group:
data["subsetGroup"] = subset_group data["productGroup"] = subset_group
elif existing_subset_doc: elif existing_subset_doc:
# Preserve previous subset group if new version does not set it # Preserve previous subset group if new version does not set it
if "subsetGroup" in existing_subset_doc.get("data", {}): if "productGroup" in existing_subset_doc.get("data", {}):
subset_group = existing_subset_doc["data"]["subsetGroup"] subset_group = existing_subset_doc["data"]["productGroup"]
data["subsetGroup"] = subset_group data["productGroup"] = subset_group
subset_id = None subset_id = None
if existing_subset_doc: if existing_subset_doc:

View file

@ -1,10 +1,10 @@
"""Produces instance.data["subsetGroup"] data used during integration. """Produces instance.data["productGroup"] data used during integration.
Requires: Requires:
dict -> context["anatomyData"] *(pyblish.api.CollectorOrder + 0.49) dict -> context["anatomyData"] *(pyblish.api.CollectorOrder + 0.49)
Provides: Provides:
instance -> subsetGroup (str) instance -> productGroup (str)
""" """
import pyblish.api import pyblish.api
@ -18,7 +18,7 @@ from ayon_core.lib import (
class IntegrateProductGroup(pyblish.api.InstancePlugin): class IntegrateProductGroup(pyblish.api.InstancePlugin):
"""Integrate Subset Group for publish.""" """Integrate Product Group for publish."""
# Run after CollectAnatomyInstanceData # Run after CollectAnatomyInstanceData
order = pyblish.api.IntegratorOrder - 0.1 order = pyblish.api.IntegratorOrder - 0.1
@ -37,11 +37,11 @@ class IntegrateProductGroup(pyblish.api.InstancePlugin):
if not self.product_grouping_profiles: if not self.product_grouping_profiles:
return return
if instance.data.get("subsetGroup"): if instance.data.get("productGroup"):
# If subsetGroup is already set then allow that value to remain # If productGroup is already set then allow that value to remain
self.log.debug(( self.log.debug((
"Skipping collect product group due to existing value: {}" "Skipping collect product group due to existing value: {}"
).format(instance.data["subsetGroup"])) ).format(instance.data["productGroup"]))
return return
# Skip if there is no matching profile # Skip if there is no matching profile
@ -79,11 +79,11 @@ class IntegrateProductGroup(pyblish.api.InstancePlugin):
except (KeyError, TemplateUnsolved): except (KeyError, TemplateUnsolved):
keys = fill_pairs.keys() keys = fill_pairs.keys()
self.log.warning(( self.log.warning((
"Subset grouping failed. Only {} are expected in Settings" "Product grouping failed. Only {} are expected in Settings"
).format(','.join(keys))) ).format(','.join(keys)))
if filled_template: if filled_template:
instance.data["subsetGroup"] = filled_template instance.data["productGroup"] = filled_template
def get_profile_filter_criteria(self, instance): def get_profile_filter_criteria(self, instance):
"""Return filter criteria for `filter_profiles`""" """Return filter criteria for `filter_profiles`"""