Merge pull request #3091 from pypeclub/bugfix/rr-control-submitter-avalon-app-name

RoyalRender Control Submission - AVALON_APP_NAME default
This commit is contained in:
Ondřej Samohel 2022-04-22 17:45:46 +02:00 committed by GitHub
commit 5cbf4cdd29
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 10 deletions

View file

@ -119,7 +119,7 @@ class OpenPypeContextSelector:
# app names and versions, but since app_name is not used
# currently down the line (but it is required by OP publish command
# right now).
self.context["app_name"] = "maya/2020"
# self.context["app_name"] = "maya/2022"
return True
@staticmethod
@ -139,7 +139,8 @@ class OpenPypeContextSelector:
env = {"AVALON_PROJECT": str(self.context.get("project")),
"AVALON_ASSET": str(self.context.get("asset")),
"AVALON_TASK": str(self.context.get("task")),
"AVALON_APP_NAME": str(self.context.get("app_name"))}
# "AVALON_APP_NAME": str(self.context.get("app_name"))
}
print(">>> setting environment:")
for k, v in env.items():
@ -184,7 +185,7 @@ selector = OpenPypeContextSelector()
selector.context["project"] = os.getenv("AVALON_PROJECT")
selector.context["asset"] = os.getenv("AVALON_ASSET")
selector.context["task"] = os.getenv("AVALON_TASK")
selector.context["app_name"] = os.getenv("AVALON_APP_NAME")
# selector.context["app_name"] = os.getenv("AVALON_APP_NAME")
# if anything inside is None, scratch the whole thing and
# ask user for context.

View file

@ -125,13 +125,14 @@ class PypeCommands:
if not any(paths):
raise RuntimeError("No publish paths specified")
env = get_app_environments_for_context(
os.environ["AVALON_PROJECT"],
os.environ["AVALON_ASSET"],
os.environ["AVALON_TASK"],
os.environ["AVALON_APP_NAME"]
)
os.environ.update(env)
if os.getenv("AVALON_APP_NAME"):
env = get_app_environments_for_context(
os.environ["AVALON_PROJECT"],
os.environ["AVALON_ASSET"],
os.environ["AVALON_TASK"],
os.environ["AVALON_APP_NAME"]
)
os.environ.update(env)
pyblish.api.register_host("shell")