From 9d6c2583ed7f822b90619a793fdb9c8e009d5c33 Mon Sep 17 00:00:00 2001 From: karimmozilla Date: Mon, 27 Sep 2021 11:36:29 +0200 Subject: [PATCH 1/6] Change mayaAscii family to mayaScene --- openpype/hosts/maya/plugins/create/create_mayaascii.py | 6 +++--- openpype/hosts/maya/plugins/load/load_reference.py | 4 ++-- openpype/hosts/maya/plugins/publish/collect_mayaascii.py | 4 ++-- .../hosts/maya/plugins/publish/extract_maya_scene_raw.py | 2 +- openpype/plugins/publish/collect_resources_path.py | 2 +- openpype/plugins/publish/integrate_new.py | 2 +- openpype/settings/defaults/project_settings/global.json | 2 +- openpype/settings/defaults/project_settings/maya.json | 2 +- .../schemas/projects_schema/schemas/schema_maya_load.json | 2 +- website/docs/pype2/admin_presets_plugins.md | 2 +- 10 files changed, 14 insertions(+), 14 deletions(-) diff --git a/openpype/hosts/maya/plugins/create/create_mayaascii.py b/openpype/hosts/maya/plugins/create/create_mayaascii.py index f51e126c00e..5ce634cec4a 100644 --- a/openpype/hosts/maya/plugins/create/create_mayaascii.py +++ b/openpype/hosts/maya/plugins/create/create_mayaascii.py @@ -1,11 +1,11 @@ from openpype.hosts.maya.api import plugin -class CreateMayaAscii(plugin.Creator): +class CreateMayaScene(plugin.Creator): """Raw Maya Ascii file export""" - name = "mayaAscii" + name = "mayaScene" label = "Maya Ascii" - family = "mayaAscii" + family = "mayaScene" icon = "file-archive-o" defaults = ['Main'] diff --git a/openpype/hosts/maya/plugins/load/load_reference.py b/openpype/hosts/maya/plugins/load/load_reference.py index d5952ed267d..544544a8238 100644 --- a/openpype/hosts/maya/plugins/load/load_reference.py +++ b/openpype/hosts/maya/plugins/load/load_reference.py @@ -12,7 +12,7 @@ class ReferenceLoader(openpype.hosts.maya.api.plugin.ReferenceLoader): families = ["model", "pointcache", "animation", - "mayaAscii", + "mayaScene", "setdress", "layout", "camera", @@ -71,7 +71,7 @@ def process_reference(self, context, name, namespace, options): except: # noqa: E722 pass - if family not in ["layout", "setdress", "mayaAscii"]: + if family not in ["layout", "setdress", "mayaScene"]: for root in roots: root.setParent(world=True) diff --git a/openpype/hosts/maya/plugins/publish/collect_mayaascii.py b/openpype/hosts/maya/plugins/publish/collect_mayaascii.py index b02f61b7c64..199fb4197cf 100644 --- a/openpype/hosts/maya/plugins/publish/collect_mayaascii.py +++ b/openpype/hosts/maya/plugins/publish/collect_mayaascii.py @@ -3,14 +3,14 @@ import pyblish.api -class CollectMayaAscii(pyblish.api.InstancePlugin): +class CollectMayaScene(pyblish.api.InstancePlugin): """Collect May Ascii Data """ order = pyblish.api.CollectorOrder + 0.2 label = 'Collect Model Data' - families = ["mayaAscii"] + families = ["mayaScene"] def process(self, instance): # Extract only current frame (override) diff --git a/openpype/hosts/maya/plugins/publish/extract_maya_scene_raw.py b/openpype/hosts/maya/plugins/publish/extract_maya_scene_raw.py index 3c2b70900df..ccae7351dc6 100644 --- a/openpype/hosts/maya/plugins/publish/extract_maya_scene_raw.py +++ b/openpype/hosts/maya/plugins/publish/extract_maya_scene_raw.py @@ -16,7 +16,7 @@ class ExtractMayaSceneRaw(openpype.api.Extractor): label = "Maya Scene (Raw)" hosts = ["maya"] - families = ["mayaAscii", + families = ["mayaScene", "setdress", "layout", "camerarig", diff --git a/openpype/plugins/publish/collect_resources_path.py b/openpype/plugins/publish/collect_resources_path.py index 98b59332dac..4f15a391c74 100644 --- a/openpype/plugins/publish/collect_resources_path.py +++ b/openpype/plugins/publish/collect_resources_path.py @@ -25,7 +25,7 @@ class CollectResourcesPath(pyblish.api.InstancePlugin): "camera", "animation", "model", - "mayaAscii", + "mayaScene", "setdress", "layout", "ass", diff --git a/openpype/plugins/publish/integrate_new.py b/openpype/plugins/publish/integrate_new.py index f9e9b43f087..1c3a8adb78a 100644 --- a/openpype/plugins/publish/integrate_new.py +++ b/openpype/plugins/publish/integrate_new.py @@ -62,7 +62,7 @@ class IntegrateAssetNew(pyblish.api.InstancePlugin): "camera", "animation", "model", - "mayaAscii", + "mayaScene", "setdress", "layout", "ass", diff --git a/openpype/settings/defaults/project_settings/global.json b/openpype/settings/defaults/project_settings/global.json index a53ae149144..1de2b172a28 100644 --- a/openpype/settings/defaults/project_settings/global.json +++ b/openpype/settings/defaults/project_settings/global.json @@ -19,7 +19,7 @@ "animation", "setdress", "layout", - "mayaAscii" + "mayaScene" ] }, "ExtractJpegEXR": { diff --git a/openpype/settings/defaults/project_settings/maya.json b/openpype/settings/defaults/project_settings/maya.json index f9911897d72..6bda996eef9 100644 --- a/openpype/settings/defaults/project_settings/maya.json +++ b/openpype/settings/defaults/project_settings/maya.json @@ -473,7 +473,7 @@ 255, 255 ], - "mayaAscii": [ + "mayaScene": [ 67, 174, 255, diff --git a/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_load.json b/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_load.json index 0b09d087008..a21f59c8e58 100644 --- a/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_load.json +++ b/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_load.json @@ -48,7 +48,7 @@ { "type": "color", "label": "Maya Scene:", - "key": "mayaAscii" + "key": "mayaScene" }, { "type": "color", diff --git a/website/docs/pype2/admin_presets_plugins.md b/website/docs/pype2/admin_presets_plugins.md index 797995d2b73..eb97a1262f9 100644 --- a/website/docs/pype2/admin_presets_plugins.md +++ b/website/docs/pype2/admin_presets_plugins.md @@ -468,7 +468,7 @@ maya outliner colours for various families "ass": [1.0, 0.332, 0.312], "camera": [0.447, 0.312, 1.0], "fbx": [1.0, 0.931, 0.312], - "mayaAscii": [0.312, 1.0, 0.747], + "mayaScene": [0.312, 1.0, 0.747], "setdress": [0.312, 1.0, 0.747], "layout": [0.312, 1.0, 0.747], "vdbcache": [0.312, 1.0, 0.428], From 4830120abbc5760ad794c5211053a53755e22a7c Mon Sep 17 00:00:00 2001 From: karimmozilla Date: Tue, 5 Oct 2021 11:42:35 +0200 Subject: [PATCH 2/6] add mayaAscii in loading --- openpype/hosts/maya/plugins/create/create_mayaascii.py | 2 +- openpype/hosts/maya/plugins/load/load_reference.py | 3 ++- .../hosts/maya/plugins/publish/extract_maya_scene_raw.py | 3 ++- openpype/plugins/publish/collect_resources_path.py | 1 + openpype/plugins/publish/integrate_new.py | 1 + .../schemas/projects_schema/schemas/schema_maya_load.json | 5 +++++ website/docs/pype2/admin_presets_plugins.md | 1 + 7 files changed, 13 insertions(+), 3 deletions(-) diff --git a/openpype/hosts/maya/plugins/create/create_mayaascii.py b/openpype/hosts/maya/plugins/create/create_mayaascii.py index 5ce634cec4a..7be867e2d59 100644 --- a/openpype/hosts/maya/plugins/create/create_mayaascii.py +++ b/openpype/hosts/maya/plugins/create/create_mayaascii.py @@ -5,7 +5,7 @@ class CreateMayaScene(plugin.Creator): """Raw Maya Ascii file export""" name = "mayaScene" - label = "Maya Ascii" + label = "Maya Scene" family = "mayaScene" icon = "file-archive-o" defaults = ['Main'] diff --git a/openpype/hosts/maya/plugins/load/load_reference.py b/openpype/hosts/maya/plugins/load/load_reference.py index 544544a8238..c2b07ea3735 100644 --- a/openpype/hosts/maya/plugins/load/load_reference.py +++ b/openpype/hosts/maya/plugins/load/load_reference.py @@ -12,6 +12,7 @@ class ReferenceLoader(openpype.hosts.maya.api.plugin.ReferenceLoader): families = ["model", "pointcache", "animation", + "mayaAscii", "mayaScene", "setdress", "layout", @@ -71,7 +72,7 @@ def process_reference(self, context, name, namespace, options): except: # noqa: E722 pass - if family not in ["layout", "setdress", "mayaScene"]: + if family not in ["layout", "setdress", "mayaAscii" , "mayaScene"]: for root in roots: root.setParent(world=True) diff --git a/openpype/hosts/maya/plugins/publish/extract_maya_scene_raw.py b/openpype/hosts/maya/plugins/publish/extract_maya_scene_raw.py index ccae7351dc6..e7fb5bc8cbf 100644 --- a/openpype/hosts/maya/plugins/publish/extract_maya_scene_raw.py +++ b/openpype/hosts/maya/plugins/publish/extract_maya_scene_raw.py @@ -16,7 +16,8 @@ class ExtractMayaSceneRaw(openpype.api.Extractor): label = "Maya Scene (Raw)" hosts = ["maya"] - families = ["mayaScene", + families = ["mayaAscii", + "mayaScene", "setdress", "layout", "camerarig", diff --git a/openpype/plugins/publish/collect_resources_path.py b/openpype/plugins/publish/collect_resources_path.py index 4f15a391c74..c21f09ab8d9 100644 --- a/openpype/plugins/publish/collect_resources_path.py +++ b/openpype/plugins/publish/collect_resources_path.py @@ -25,6 +25,7 @@ class CollectResourcesPath(pyblish.api.InstancePlugin): "camera", "animation", "model", + "mayaAscii", "mayaScene", "setdress", "layout", diff --git a/openpype/plugins/publish/integrate_new.py b/openpype/plugins/publish/integrate_new.py index 1c3a8adb78a..6275973cdf8 100644 --- a/openpype/plugins/publish/integrate_new.py +++ b/openpype/plugins/publish/integrate_new.py @@ -62,6 +62,7 @@ class IntegrateAssetNew(pyblish.api.InstancePlugin): "camera", "animation", "model", + "mayaAscii", "mayaScene", "setdress", "layout", diff --git a/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_load.json b/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_load.json index a21f59c8e58..7c87644817b 100644 --- a/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_load.json +++ b/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_load.json @@ -45,6 +45,11 @@ "label": "FBX:", "key": "fbx" }, + { + "type": "color", + "label": "Maya Ascii:", + "key": "mayaAscii" + }, { "type": "color", "label": "Maya Scene:", diff --git a/website/docs/pype2/admin_presets_plugins.md b/website/docs/pype2/admin_presets_plugins.md index eb97a1262f9..9c838d4a64d 100644 --- a/website/docs/pype2/admin_presets_plugins.md +++ b/website/docs/pype2/admin_presets_plugins.md @@ -468,6 +468,7 @@ maya outliner colours for various families "ass": [1.0, 0.332, 0.312], "camera": [0.447, 0.312, 1.0], "fbx": [1.0, 0.931, 0.312], + "mayaAscii": [0.312, 1.0, 0.747], "mayaScene": [0.312, 1.0, 0.747], "setdress": [0.312, 1.0, 0.747], "layout": [0.312, 1.0, 0.747], From 502d5d56479e052909fcedad92be1339c8bad445 Mon Sep 17 00:00:00 2001 From: karimmozilla Date: Tue, 5 Oct 2021 11:52:51 +0200 Subject: [PATCH 3/6] edit comments --- openpype/hosts/maya/plugins/create/create_mayaascii.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/hosts/maya/plugins/create/create_mayaascii.py b/openpype/hosts/maya/plugins/create/create_mayaascii.py index 7be867e2d59..8bbdf107c6a 100644 --- a/openpype/hosts/maya/plugins/create/create_mayaascii.py +++ b/openpype/hosts/maya/plugins/create/create_mayaascii.py @@ -2,7 +2,7 @@ class CreateMayaScene(plugin.Creator): - """Raw Maya Ascii file export""" + """Raw Maya Scene file export""" name = "mayaScene" label = "Maya Scene" From ea949146d1b65f76f050980d235dc7e6b67ec7cb Mon Sep 17 00:00:00 2001 From: karimmozilla Date: Tue, 5 Oct 2021 11:56:56 +0200 Subject: [PATCH 4/6] add color --- openpype/settings/defaults/project_settings/maya.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/openpype/settings/defaults/project_settings/maya.json b/openpype/settings/defaults/project_settings/maya.json index 6bda996eef9..b4641499660 100644 --- a/openpype/settings/defaults/project_settings/maya.json +++ b/openpype/settings/defaults/project_settings/maya.json @@ -473,6 +473,12 @@ 255, 255 ], + "mayaAscii": [ + 67, + 174, + 255, + 255 + ], "mayaScene": [ 67, 174, From 0d2d878e8a50d9f5787d2cc8e6aef892e74b4b13 Mon Sep 17 00:00:00 2001 From: karimmozilla <82811760+karimmozilla@users.noreply.github.com> Date: Tue, 5 Oct 2021 11:59:55 +0200 Subject: [PATCH 5/6] delete white space --- openpype/hosts/maya/plugins/load/load_reference.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/hosts/maya/plugins/load/load_reference.py b/openpype/hosts/maya/plugins/load/load_reference.py index c2b07ea3735..6dd161cf989 100644 --- a/openpype/hosts/maya/plugins/load/load_reference.py +++ b/openpype/hosts/maya/plugins/load/load_reference.py @@ -72,7 +72,7 @@ def process_reference(self, context, name, namespace, options): except: # noqa: E722 pass - if family not in ["layout", "setdress", "mayaAscii" , "mayaScene"]: + if family not in ["layout", "setdress", "mayaAscii", "mayaScene"]: for root in roots: root.setParent(world=True) From 81c6987dbf84cb6d721f98eb1aa6296915e530ac Mon Sep 17 00:00:00 2001 From: karimmozilla Date: Wed, 6 Oct 2021 12:02:04 +0200 Subject: [PATCH 6/6] rename collect_maya_scene --- .../publish/{collect_mayaascii.py => collect_maya_scene.py} | 2 +- .../plugins/publish/{collect_scene.py => collect_workfile.py} | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename openpype/hosts/maya/plugins/publish/{collect_mayaascii.py => collect_maya_scene.py} (95%) rename openpype/hosts/maya/plugins/publish/{collect_scene.py => collect_workfile.py} (97%) diff --git a/openpype/hosts/maya/plugins/publish/collect_mayaascii.py b/openpype/hosts/maya/plugins/publish/collect_maya_scene.py similarity index 95% rename from openpype/hosts/maya/plugins/publish/collect_mayaascii.py rename to openpype/hosts/maya/plugins/publish/collect_maya_scene.py index 199fb4197cf..eb21b17989e 100644 --- a/openpype/hosts/maya/plugins/publish/collect_mayaascii.py +++ b/openpype/hosts/maya/plugins/publish/collect_maya_scene.py @@ -4,7 +4,7 @@ class CollectMayaScene(pyblish.api.InstancePlugin): - """Collect May Ascii Data + """Collect Maya Scene Data """ diff --git a/openpype/hosts/maya/plugins/publish/collect_scene.py b/openpype/hosts/maya/plugins/publish/collect_workfile.py similarity index 97% rename from openpype/hosts/maya/plugins/publish/collect_scene.py rename to openpype/hosts/maya/plugins/publish/collect_workfile.py index be2a294f261..ee676f50d00 100644 --- a/openpype/hosts/maya/plugins/publish/collect_scene.py +++ b/openpype/hosts/maya/plugins/publish/collect_workfile.py @@ -4,7 +4,7 @@ from maya import cmds -class CollectMayaScene(pyblish.api.ContextPlugin): +class CollectWorkfile(pyblish.api.ContextPlugin): """Inject the current working file into context""" order = pyblish.api.CollectorOrder - 0.01