Changed how alembic files are extracted

This commit is contained in:
Simone Barbieri 2023-10-11 14:38:23 +01:00
parent 7fec582a2d
commit 9f82f8ee2f
6 changed files with 28 additions and 9 deletions

View file

@ -76,6 +76,9 @@ class CollectInstances(pyblish.api.ContextPlugin):
else:
members = group.children_recursive
if family == "pointcache":
instance.data["families"].append("abc.export")
members.append(group)
instance[:] = members
self.log.debug(json.dumps(instance.data, indent=4))

View file

@ -12,8 +12,7 @@ class ExtractABC(publish.Extractor):
label = "Extract ABC"
hosts = ["blender"]
families = ["model", "pointcache"]
optional = True
families = ["abc.export"]
def process(self, instance):
# Define extract output file path

View file

@ -0,0 +1,17 @@
import pyblish.api
from openpype.pipeline import publish
class ExtractModelABC(publish.Extractor):
"""Extract model as ABC."""
order = pyblish.api.ExtractorOrder - 0.1
label = "Extract Model ABC"
hosts = ["blender"]
families = ["model"]
optional = True
def process(self, instance):
# Add abc.export family to the instance, to allow the extraction
# as alembic of the asset.
instance.data["families"].append("abc.export")

View file

@ -89,7 +89,7 @@
"optional": true,
"active": false
},
"ExtractABC": {
"ExtractModelABC": {
"enabled": true,
"optional": true,
"active": false

View file

@ -181,12 +181,12 @@
"name": "template_publish_plugin",
"template_data": [
{
"key": "ExtractFBX",
"label": "Extract FBX (model and rig)"
"key": "ExtractModelABC",
"label": "Extract ABC (model)"
},
{
"key": "ExtractABC",
"label": "Extract ABC (model and pointcache)"
"key": "ExtractFBX",
"label": "Extract FBX (model and rig)"
},
{
"key": "ExtractBlendAnimation",

View file

@ -103,7 +103,7 @@ class PublishPuginsModel(BaseSettingsModel):
default_factory=ValidatePluginModel,
title="Extract FBX"
)
ExtractABC: ValidatePluginModel = Field(
ExtractModelABC: ValidatePluginModel = Field(
default_factory=ValidatePluginModel,
title="Extract ABC"
)
@ -197,7 +197,7 @@ DEFAULT_BLENDER_PUBLISH_SETTINGS = {
"optional": True,
"active": False
},
"ExtractABC": {
"ExtractModelABC": {
"enabled": True,
"optional": True,
"active": False