mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
remove the need to set AVALON_APP_NAME
This commit is contained in:
parent
f20551854f
commit
8d45b649ec
2 changed files with 12 additions and 10 deletions
|
|
@ -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"] = "celaction/local"
|
||||
# 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.
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue