From 8f82aab6f1eacd7523259f1b8ae184f16a66b58a Mon Sep 17 00:00:00 2001 From: Milan Kolar Date: Tue, 17 Nov 2020 23:34:46 +0100 Subject: [PATCH 1/2] add camerarig family to maya --- pype/plugins/global/publish/integrate_new.py | 3 ++- pype/plugins/maya/create/create_camera.py | 11 ++++++++++- pype/plugins/maya/create/create_cameraRig.py | 11 +++++++++++ pype/plugins/maya/load/load_reference.py | 3 ++- pype/plugins/maya/publish/extract_maya_scene_raw.py | 3 ++- 5 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 pype/plugins/maya/create/create_cameraRig.py diff --git a/pype/plugins/global/publish/integrate_new.py b/pype/plugins/global/publish/integrate_new.py index d040c7167c..802be69ac5 100644 --- a/pype/plugins/global/publish/integrate_new.py +++ b/pype/plugins/global/publish/integrate_new.py @@ -90,7 +90,8 @@ class IntegrateAssetNew(pyblish.api.InstancePlugin): "harmony.template", "harmony.palette", "editorial", - "background" + "background", + "camerarig" ] exclude_families = ["clip"] db_representation_context_keys = [ diff --git a/pype/plugins/maya/create/create_camera.py b/pype/plugins/maya/create/create_camera.py index e40260401c..0841b0ff86 100644 --- a/pype/plugins/maya/create/create_camera.py +++ b/pype/plugins/maya/create/create_camera.py @@ -5,7 +5,7 @@ from pype.hosts.maya import lib class CreateCamera(avalon.maya.Creator): """Single baked camera""" - name = "cameraDefault" + name = "cameraMain" label = "Camera" family = "camera" icon = "video-camera" @@ -22,3 +22,12 @@ class CreateCamera(avalon.maya.Creator): # Bake to world space by default, when this is False it will also # include the parent hierarchy in the baked results self.data['bakeToWorldSpace'] = True + +class CreateCameraRig(avalon.maya.Creator): + """Complex hierarchy with camera.""" + + name = "camerarigMain" + label = "Camera Rig" + family = "camerarig" + icon = "video-camera" + defaults = ['Main'] diff --git a/pype/plugins/maya/create/create_cameraRig.py b/pype/plugins/maya/create/create_cameraRig.py new file mode 100644 index 0000000000..e7cc40dc24 --- /dev/null +++ b/pype/plugins/maya/create/create_cameraRig.py @@ -0,0 +1,11 @@ +import avalon.maya + + +class CreateMayaAscii(avalon.maya.Creator): + """Raw Maya Ascii file export""" + + name = "mayaAscii" + label = "Maya Ascii" + family = "mayaAscii" + icon = "file-archive-o" + defaults = ['Main'] diff --git a/pype/plugins/maya/load/load_reference.py b/pype/plugins/maya/load/load_reference.py index 3a9b75a2f5..dbb3cc98b2 100644 --- a/pype/plugins/maya/load/load_reference.py +++ b/pype/plugins/maya/load/load_reference.py @@ -15,7 +15,8 @@ class ReferenceLoader(pype.hosts.maya.plugin.ReferenceLoader): "setdress", "layout", "camera", - "rig"] + "rig", + "camerarig"] representations = ["ma", "abc", "fbx", "mb"] tool_names = ["loader"] diff --git a/pype/plugins/maya/publish/extract_maya_scene_raw.py b/pype/plugins/maya/publish/extract_maya_scene_raw.py index d273646af8..0e256bc69f 100644 --- a/pype/plugins/maya/publish/extract_maya_scene_raw.py +++ b/pype/plugins/maya/publish/extract_maya_scene_raw.py @@ -18,7 +18,8 @@ class ExtractMayaSceneRaw(pype.api.Extractor): hosts = ["maya"] families = ["mayaAscii", "setdress", - "layout"] + "layout", + "camerarig"] scene_type = "ma" def process(self, instance): From 4a1fa9e8e3a9ac3f777e10750c4eca639d7f85d2 Mon Sep 17 00:00:00 2001 From: Milan Kolar Date: Tue, 17 Nov 2020 23:42:52 +0100 Subject: [PATCH 2/2] shut up hound and remove obsolete creator --- pype/plugins/maya/create/create_camera.py | 1 + pype/plugins/maya/create/create_cameraRig.py | 11 ----------- 2 files changed, 1 insertion(+), 11 deletions(-) delete mode 100644 pype/plugins/maya/create/create_cameraRig.py diff --git a/pype/plugins/maya/create/create_camera.py b/pype/plugins/maya/create/create_camera.py index 0841b0ff86..acff93c03c 100644 --- a/pype/plugins/maya/create/create_camera.py +++ b/pype/plugins/maya/create/create_camera.py @@ -23,6 +23,7 @@ class CreateCamera(avalon.maya.Creator): # include the parent hierarchy in the baked results self.data['bakeToWorldSpace'] = True + class CreateCameraRig(avalon.maya.Creator): """Complex hierarchy with camera.""" diff --git a/pype/plugins/maya/create/create_cameraRig.py b/pype/plugins/maya/create/create_cameraRig.py deleted file mode 100644 index e7cc40dc24..0000000000 --- a/pype/plugins/maya/create/create_cameraRig.py +++ /dev/null @@ -1,11 +0,0 @@ -import avalon.maya - - -class CreateMayaAscii(avalon.maya.Creator): - """Raw Maya Ascii file export""" - - name = "mayaAscii" - label = "Maya Ascii" - family = "mayaAscii" - icon = "file-archive-o" - defaults = ['Main']