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:
Jakub Trllo 2024-03-28 10:26:04 +01:00 committed by GitHub
commit c131071c7d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 20 additions and 2 deletions

View file

@ -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)

View file

@ -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,

View file

@ -1,3 +1,3 @@
# -*- coding: utf-8 -*-
"""Package declaring addon version."""
__version__ = "0.1.11"
__version__ = "0.1.12"