Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maya: Extract Alembic/Pointcache add bake attributes to always be included #221

Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
Expand All @@ -40,10 +44,12 @@ def process(self, instance):
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)
Expand Down
14 changes: 13 additions & 1 deletion server_addon/maya/server/settings/publishers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -1193,7 +1203,9 @@ class PublishersModel(BaseSettingsModel):
"pointcache",
"model",
"vrayproxy.alembic"
]
],
"bake_attributes": [],
"bake_attribute_prefixes": []
},
"ExtractObj": {
"enabled": False,
Expand Down
2 changes: 1 addition & 1 deletion server_addon/maya/server/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# -*- coding: utf-8 -*-
"""Package declaring addon version."""
__version__ = "0.1.9"
__version__ = "0.1.10"