mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 08:24:53 +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 = instance_data.setdefault(
|
||||||
"creator_attributes", dict())
|
"creator_attributes", dict())
|
||||||
for key in [
|
for key in [
|
||||||
|
"review",
|
||||||
"exportPresetUrl",
|
"exportPresetUrl",
|
||||||
"exportFileFormat",
|
"exportFileFormat",
|
||||||
"exportSize",
|
"exportSize",
|
||||||
|
|
@ -143,6 +144,10 @@ class CreateTextures(Creator):
|
||||||
}
|
}
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
BoolDef("review",
|
||||||
|
label="Review",
|
||||||
|
tooltip="Mark as reviewable",
|
||||||
|
default=True),
|
||||||
EnumDef("exportChannel",
|
EnumDef("exportChannel",
|
||||||
items=export_channel_enum,
|
items=export_channel_enum,
|
||||||
multiselection=True,
|
multiselection=True,
|
||||||
|
|
|
||||||
|
|
@ -124,7 +124,6 @@ class CollectTextureSet(pyblish.api.InstancePlugin):
|
||||||
staging_dir = os.path.dirname(first_filepath)
|
staging_dir = os.path.dirname(first_filepath)
|
||||||
representation["tags"] = ["review"]
|
representation["tags"] = ["review"]
|
||||||
representation["stagingDir"] = staging_dir
|
representation["stagingDir"] = staging_dir
|
||||||
|
|
||||||
# Clone the instance
|
# Clone the instance
|
||||||
product_type = "image"
|
product_type = "image"
|
||||||
image_instance = context.create_instance(image_product_name)
|
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["productType"] = product_type
|
||||||
image_instance.data["family"] = product_type
|
image_instance.data["family"] = product_type
|
||||||
image_instance.data["families"] = [product_type, "textures"]
|
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]
|
image_instance.data["representations"] = [representation]
|
||||||
|
|
||||||
# Group the textures together in the loader
|
# Group the textures together in the loader
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue