mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Merge pull request #221 from BigRoy/enhancement/maya_extract_pointcache_bake_attributes
Maya: Extract Alembic/Pointcache add bake attributes to always be included
This commit is contained in:
commit
c131071c7d
3 changed files with 20 additions and 2 deletions
|
|
@ -26,6 +26,10 @@ class ExtractAlembic(publish.Extractor):
|
|||
families = ["pointcache", "model", "vrayproxy.alembic"]
|
||||
targets = ["local", "remote"]
|
||||
|
||||
# From settings
|
||||
bake_attributes = []
|
||||
bake_attribute_prefixes = []
|
||||
|
||||
def process(self, instance):
|
||||
if instance.data.get("farm"):
|
||||
self.log.debug("Should be processed on farm, skipping.")
|
||||
|
|
@ -40,10 +44,12 @@ class ExtractAlembic(publish.Extractor):
|
|||
attrs = instance.data.get("attr", "").split(";")
|
||||
attrs = [value for value in attrs if value.strip()]
|
||||
attrs += instance.data.get("userDefinedAttributes", [])
|
||||
attrs += self.bake_attributes
|
||||
attrs += ["cbId"]
|
||||
|
||||
attr_prefixes = instance.data.get("attrPrefix", "").split(";")
|
||||
attr_prefixes = [value for value in attr_prefixes if value.strip()]
|
||||
attr_prefixes += self.bake_attribute_prefixes
|
||||
|
||||
self.log.debug("Extracting pointcache..")
|
||||
dirname = self.staging_dir(instance)
|
||||
|
|
|
|||
|
|
@ -299,6 +299,16 @@ class ExtractAlembicModel(BaseSettingsModel):
|
|||
families: list[str] = SettingsField(
|
||||
default_factory=list,
|
||||
title="Families")
|
||||
bake_attributes: list[str] = SettingsField(
|
||||
default_factory=list, title="Bake Attributes",
|
||||
description="List of attributes that will be included in the alembic "
|
||||
"export.",
|
||||
)
|
||||
bake_attribute_prefixes: list[str] = SettingsField(
|
||||
default_factory=list, title="Bake Attribute Prefixes",
|
||||
description="List of attribute prefixes for attributes that will be "
|
||||
"included in the alembic export.",
|
||||
)
|
||||
|
||||
|
||||
class ExtractObjModel(BaseSettingsModel):
|
||||
|
|
@ -1184,7 +1194,9 @@ DEFAULT_PUBLISH_SETTINGS = {
|
|||
"pointcache",
|
||||
"model",
|
||||
"vrayproxy.alembic"
|
||||
]
|
||||
],
|
||||
"bake_attributes": [],
|
||||
"bake_attribute_prefixes": []
|
||||
},
|
||||
"ExtractObj": {
|
||||
"enabled": False,
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
"""Package declaring addon version."""
|
||||
__version__ = "0.1.11"
|
||||
__version__ = "0.1.12"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue