mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
Merge pull request #602 from ynput/enhancement/AY-5687_Substance-review-attribute
Substance Painter: add review attributes in texture creator
This commit is contained in:
commit
4a871c360d
2 changed files with 8 additions and 1 deletions
|
|
@ -46,6 +46,7 @@ class CreateTextures(Creator):
|
|||
creator_attributes = instance_data.setdefault(
|
||||
"creator_attributes", dict())
|
||||
for key in [
|
||||
"review",
|
||||
"exportPresetUrl",
|
||||
"exportFileFormat",
|
||||
"exportSize",
|
||||
|
|
@ -143,6 +144,10 @@ class CreateTextures(Creator):
|
|||
}
|
||||
|
||||
return [
|
||||
BoolDef("review",
|
||||
label="Review",
|
||||
tooltip="Mark as reviewable",
|
||||
default=True),
|
||||
EnumDef("exportChannel",
|
||||
items=export_channel_enum,
|
||||
multiselection=True,
|
||||
|
|
|
|||
|
|
@ -124,7 +124,6 @@ class CollectTextureSet(pyblish.api.InstancePlugin):
|
|||
staging_dir = os.path.dirname(first_filepath)
|
||||
representation["tags"] = ["review"]
|
||||
representation["stagingDir"] = staging_dir
|
||||
|
||||
# Clone the instance
|
||||
product_type = "image"
|
||||
image_instance = context.create_instance(image_product_name)
|
||||
|
|
@ -136,6 +135,9 @@ class CollectTextureSet(pyblish.api.InstancePlugin):
|
|||
image_instance.data["productType"] = product_type
|
||||
image_instance.data["family"] = product_type
|
||||
image_instance.data["families"] = [product_type, "textures"]
|
||||
if instance.data["creator_attributes"].get("review"):
|
||||
image_instance.data["families"].append("review")
|
||||
|
||||
image_instance.data["representations"] = [representation]
|
||||
|
||||
# Group the textures together in the loader
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue