Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Maya: FBX camera export #3253

Merged
merged 1 commit into from
May 26, 2022
Merged
Show file tree
Hide file tree
Changes from all 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
20 changes: 20 additions & 0 deletions openpype/hosts/maya/plugins/publish/collect_fbx_camera.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
from maya import cmds # noqa
import pyblish.api


class CollectFbxCamera(pyblish.api.InstancePlugin):
"""Collect Camera for FBX export."""

order = pyblish.api.CollectorOrder + 0.2
label = "Collect Camera for FBX export"
families = ["camera"]

def process(self, instance):
if not instance.data.get("families"):
instance.data["families"] = []

if "fbx" not in instance.data["families"]:
instance.data["families"].append("fbx")

instance.data["cameras"] = True
3 changes: 3 additions & 0 deletions openpype/settings/defaults/project_settings/maya.json
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,9 @@
"CollectMayaRender": {
"sync_workfile_version": false
},
"CollectFbxCamera": {
"enabled": false
},
"ValidateInstanceInContext": {
"enabled": true,
"optional": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,20 @@
}
]
},
{
"type": "dict",
"collapsible": true,
"key": "CollectFbxCamera",
"label": "Collect Camera for FBX export",
"checkbox_key": "enabled",
"children": [
{
"type": "boolean",
"key": "enabled",
"label": "Enabled"
}
]
},
{
"type": "splitter"
},
Expand Down