mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Changed how alembic files are extracted
This commit is contained in:
parent
7fec582a2d
commit
9f82f8ee2f
6 changed files with 28 additions and 9 deletions
|
|
@ -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))
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
17
openpype/hosts/blender/plugins/publish/extract_abc_model.py
Normal file
17
openpype/hosts/blender/plugins/publish/extract_abc_model.py
Normal 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")
|
||||
|
|
@ -89,7 +89,7 @@
|
|||
"optional": true,
|
||||
"active": false
|
||||
},
|
||||
"ExtractABC": {
|
||||
"ExtractModelABC": {
|
||||
"enabled": true,
|
||||
"optional": true,
|
||||
"active": false
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue