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

Maya: Use project name instead of project code #3709

Merged
merged 1 commit into from
Aug 24, 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
2 changes: 1 addition & 1 deletion openpype/hosts/maya/plugins/load/_load_animation.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def process_reference(self, context, name, namespace, data):
# hero_001 (abc)
# asset_counter{optional}
file_url = self.prepare_root_value(self.fname,
context["project"]["code"])
context["project"]["name"])
nodes = cmds.file(file_url,
namespace=namespace,
sharedReferenceFile=False,
Expand Down
7 changes: 4 additions & 3 deletions openpype/hosts/maya/plugins/load/load_ass.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,9 @@ def process_reference(self, context, name, namespace, options):

proxyPath = proxyPath_base + ".ma"

project_name = context["project"]["name"]
file_url = self.prepare_root_value(proxyPath,
context["project"]["code"])
project_name)

nodes = cmds.file(file_url,
namespace=namespace,
Expand All @@ -85,7 +86,7 @@ def process_reference(self, context, name, namespace, options):
proxyShape.dso.set(path)
proxyShape.aiOverrideShaders.set(0)

settings = get_project_settings(os.environ['AVALON_PROJECT'])
settings = get_project_settings(project_name)
colors = settings['maya']['load']['colors']

c = colors.get(family)
Expand Down Expand Up @@ -128,7 +129,7 @@ def update(self, container, representation):
file_url = self.prepare_root_value(proxyPath,
representation["context"]
["project"]
["code"])
["name"])
content = cmds.file(file_url,
loadReference=reference_node,
type="mayaAscii",
Expand Down
2 changes: 1 addition & 1 deletion openpype/hosts/maya/plugins/load/load_look.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def process_reference(self, context, name, namespace, options):

with lib.maintained_selection():
file_url = self.prepare_root_value(self.fname,
context["project"]["code"])
context["project"]["name"])
nodes = cmds.file(file_url,
namespace=namespace,
reference=True,
Expand Down
2 changes: 1 addition & 1 deletion openpype/hosts/maya/plugins/load/load_reference.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def process_reference(self, context, name, namespace, options):
with maintained_selection():
cmds.loadPlugin("AbcImport.mll", quiet=True)
file_url = self.prepare_root_value(self.fname,
context["project"]["code"])
context["project"]["name"])
nodes = cmds.file(file_url,
namespace=namespace,
sharedReferenceFile=False,
Expand Down
2 changes: 1 addition & 1 deletion openpype/hosts/maya/plugins/load/load_yeti_rig.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def process_reference(
# load rig
with lib.maintained_selection():
file_url = self.prepare_root_value(self.fname,
context["project"]["code"])
context["project"]["name"])
nodes = cmds.file(file_url,
namespace=namespace,
reference=True,
Expand Down