From 017fe73609b20b290f09c72f8e470407fef85260 Mon Sep 17 00:00:00 2001 From: aardschok Date: Thu, 21 Sep 2017 13:50:45 +0200 Subject: [PATCH 1/3] added setdress family and collector --- .../plugins/maya/create/colorbleed_setdress.py | 9 +++++++++ colorbleed/plugins/maya/publish/collect_setdress.py | 13 +++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 colorbleed/plugins/maya/create/colorbleed_setdress.py create mode 100644 colorbleed/plugins/maya/publish/collect_setdress.py diff --git a/colorbleed/plugins/maya/create/colorbleed_setdress.py b/colorbleed/plugins/maya/create/colorbleed_setdress.py new file mode 100644 index 0000000000..45f3ffcf84 --- /dev/null +++ b/colorbleed/plugins/maya/create/colorbleed_setdress.py @@ -0,0 +1,9 @@ +import avalon.maya + + +class CreateSetdress(avalon.maya.Creator): + """Skeleton and controls for manipulation of the geometry""" + + name = "setDress" + label = "Setdress" + family = "colorbleed.setdress" diff --git a/colorbleed/plugins/maya/publish/collect_setdress.py b/colorbleed/plugins/maya/publish/collect_setdress.py new file mode 100644 index 0000000000..dda47cd7d5 --- /dev/null +++ b/colorbleed/plugins/maya/publish/collect_setdress.py @@ -0,0 +1,13 @@ +from maya import cmds + +import pyblish.api + + +class CollectSetdress(pyblish.api.InstancePlugin): + + order = pyblish.api.CollectorOrder + 0.499 + label = 'Collect Model Data' + families = ["colorbleed.setdress"] + + def process(self, instance): + pass From f2e5e330974bf223bcca715e1d7063839fa607c1 Mon Sep 17 00:00:00 2001 From: aardschok Date: Thu, 21 Sep 2017 14:08:27 +0200 Subject: [PATCH 2/3] added project manager to CB menu, temp location - needs to move to Avalon menu --- colorbleed/maya/menu.json | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/colorbleed/maya/menu.json b/colorbleed/maya/menu.json index 77cf89ba76..d9728c2245 100644 --- a/colorbleed/maya/menu.json +++ b/colorbleed/maya/menu.json @@ -6,6 +6,13 @@ "title": "Version Up", "tooltip": "Incremental save with a specific format" }, + { + "type": "action", + "command": "$COLORBLEED_SCRIPTS\\avalon\\launch_manager.py", + "sourcetype": "file", + "title": "Project Manager", + "tooltip": "Add assets to the project" + }, { "type": "separator" }, From 492a7f468ad3045e4ba05444c5c6f54f5e6b6644 Mon Sep 17 00:00:00 2001 From: aardschok Date: Fri, 22 Sep 2017 11:38:58 +0200 Subject: [PATCH 3/3] added Maya Ascii loader --- .../plugins/maya/load/load_mayaascii.py | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 colorbleed/plugins/maya/load/load_mayaascii.py diff --git a/colorbleed/plugins/maya/load/load_mayaascii.py b/colorbleed/plugins/maya/load/load_mayaascii.py new file mode 100644 index 0000000000..7bc75fca45 --- /dev/null +++ b/colorbleed/plugins/maya/load/load_mayaascii.py @@ -0,0 +1,34 @@ +from avalon import api + + +class MayaAsciiLoader(api.Loader): + """Load the model""" + + families = ["colorbleed.mayaAscii"] + representations = ["ma"] + + label = "Reference Maya Ascii" + order = -10 + icon = "code-fork" + color = "orange" + + def process(self, name, namespace, context, data): + + import maya.cmds as cmds + from avalon import maya + + # Create a readable namespace + # Namespace should contain asset name and counter + # TEST_001{_descriptor} where `descriptor` can be `_abc` for example + assetname = "{}_".format(namespace.split("_")[0]) + namespace = maya.unique_namespace(assetname, format="%03d") + + with maya.maintained_selection(): + nodes = cmds.file(self.fname, + namespace=namespace, + reference=True, + returnNewNodes=True, + groupReference=True, + groupName="{}:{}".format(namespace, name)) + + self[:] = nodes