From 0445938ef4d8f52f4e6a0d7a0775ea3178d3e0ef Mon Sep 17 00:00:00 2001 From: Milan Kolar Date: Tue, 17 Nov 2020 23:35:58 +0100 Subject: [PATCH 1/2] fix loading of vray proxies --- pype/plugins/maya/load/load_vrayproxy.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pype/plugins/maya/load/load_vrayproxy.py b/pype/plugins/maya/load/load_vrayproxy.py index 785488d923..c654f60e09 100644 --- a/pype/plugins/maya/load/load_vrayproxy.py +++ b/pype/plugins/maya/load/load_vrayproxy.py @@ -39,20 +39,20 @@ class VRayProxyLoader(api.Loader): with lib.maintained_selection(): cmds.namespace(addNamespace=namespace) with namespaced(namespace, new=False): - nodes = self.create_vray_proxy(name, + nodes, group_node = self.create_vray_proxy(name, filename=self.fname) self[:] = nodes if not nodes: return + # colour the group node presets = config.get_presets(project=os.environ['AVALON_PROJECT']) colors = presets['plugins']['maya']['load']['colors'] - c = colors.get(family) if c is not None: - cmds.setAttr("{0}_{1}.useOutlinerColor".format(name, "GRP"), 1) - cmds.setAttr("{0}_{1}.outlinerColor".format(name, "GRP"), + cmds.setAttr("{0}.useOutlinerColor".format(group_node), 1) + cmds.setAttr("{0}.outlinerColor".format(group_node), c[0], c[1], c[2]) return containerise( @@ -158,4 +158,5 @@ class VRayProxyLoader(api.Loader): cmds.refresh() cmds.setAttr("{}.geomType".format(vray_mesh), 2) - return nodes + + return nodes, group_node From 8fdb75b720b7649f0ee2b7c111a6d8ef93da21c0 Mon Sep 17 00:00:00 2001 From: Milan Kolar Date: Tue, 17 Nov 2020 23:44:56 +0100 Subject: [PATCH 2/2] hound fixes --- pype/plugins/maya/load/load_vrayproxy.py | 1 - 1 file changed, 1 deletion(-) diff --git a/pype/plugins/maya/load/load_vrayproxy.py b/pype/plugins/maya/load/load_vrayproxy.py index c654f60e09..894ec75c32 100644 --- a/pype/plugins/maya/load/load_vrayproxy.py +++ b/pype/plugins/maya/load/load_vrayproxy.py @@ -158,5 +158,4 @@ class VRayProxyLoader(api.Loader): cmds.refresh() cmds.setAttr("{}.geomType".format(vray_mesh), 2) - return nodes, group_node