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

Commit

Permalink
Merge pull request #3709 from pypeclub/bugfix/use_project_name_instea…
Browse files Browse the repository at this point in the history
…d_of_code

Maya: Use project name instead of project code
  • Loading branch information
iLLiCiTiT authored Aug 24, 2022
2 parents fd6f10d + 90910cc commit 60be0d3
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
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

0 comments on commit 60be0d3

Please sign in to comment.