mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-26 22:02:15 +01:00
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:
commit
1ed5dd5f53
4 changed files with 40 additions and 2 deletions
|
|
@ -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
|
||||
|
|
@ -1,3 +1,3 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
"""Package declaring AYON addon 'maya' version."""
|
||||
__version__ = "0.2.7"
|
||||
__version__ = "0.2.8"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
name = "maya"
|
||||
title = "Maya"
|
||||
version = "0.2.7"
|
||||
version = "0.2.8"
|
||||
client_dir = "ayon_maya"
|
||||
|
||||
ayon_required_addons = {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue