Merge pull request #699 from ynput/enhancement/AY-5774_Maya-fbx-extractor-for-model-family

Maya: Publishing fbx in model family
This commit is contained in:
Kayla Man 2024-06-26 17:27:25 +08:00 committed by GitHub
commit 1ed5dd5f53
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 40 additions and 2 deletions

View file

@ -0,0 +1,29 @@
import pyblish.api
from ayon_core.pipeline import OptionalPyblishPluginMixin
from ayon_maya.api import plugin
class CollectFbxModel(plugin.MayaInstancePlugin,
OptionalPyblishPluginMixin):
"""Collect Camera for FBX export."""
order = pyblish.api.CollectorOrder + 0.2
label = "Collect Fbx Model"
families = ["model"]
optional = True
def process(self, instance):
if not self.is_active(instance.data):
return
if not instance.data.get("families"):
instance.data["families"] = []
if "fbx" not in instance.data["families"]:
instance.data["families"].append("fbx")
for key in {
"bakeComplexAnimation", "bakeResampleAnimation",
"skins", "constraints", "lights"}:
instance.data[key] = False

View file

@ -1,3 +1,3 @@
# -*- coding: utf-8 -*-
"""Package declaring AYON addon 'maya' version."""
__version__ = "0.2.7"
__version__ = "0.2.8"

View file

@ -1,6 +1,6 @@
name = "maya"
title = "Maya"
version = "0.2.7"
version = "0.2.8"
client_dir = "ayon_maya"
ayon_required_addons = {

View file

@ -625,6 +625,10 @@ class PublishersModel(BaseSettingsModel):
default_factory=CollectFbxCameraModel,
title="Collect Camera for FBX export",
)
CollectFbxModel: BasicValidateModel = SettingsField(
default_factory=BasicValidateModel,
title="Collect Model for FBX export",
)
CollectGLTF: CollectGLTFModel = SettingsField(
default_factory=CollectGLTFModel,
title="Collect Assets for GLB/GLTF export"
@ -1047,6 +1051,11 @@ DEFAULT_PUBLISH_SETTINGS = {
"CollectFbxCamera": {
"enabled": False
},
"CollectFbxModel": {
"enabled": False,
"optional": True,
"active": True
},
"CollectGLTF": {
"enabled": False
},