diff --git a/openpype/hosts/celaction/api/cli.py b/openpype/hosts/celaction/api/cli.py index 0a70610acb..5b30da7273 100644 --- a/openpype/hosts/celaction/api/cli.py +++ b/openpype/hosts/celaction/api/cli.py @@ -57,25 +57,10 @@ def _prepare_publish_environments(): project_name = os.getenv("AVALON_PROJECT") asset_name = os.getenv("AVALON_ASSET") - io.install() - project_doc = io.find_one({ - "type": "project" - }) - av_asset = io.find_one({ - "type": "asset", - "name": asset_name - }) - parents = av_asset["data"]["parents"] - hierarchy = "" - if parents: - hierarchy = "/".join(parents) - env["AVALON_PROJECT"] = project_name env["AVALON_ASSET"] = asset_name env["AVALON_TASK"] = os.getenv("AVALON_TASK") env["AVALON_WORKDIR"] = os.getenv("AVALON_WORKDIR") - env["AVALON_HIERARCHY"] = hierarchy - env["AVALON_PROJECTCODE"] = project_doc["data"].get("code", "") env["AVALON_APP"] = f"hosts.{publish_host}" env["AVALON_APP_NAME"] = "celaction_local" diff --git a/openpype/tools/standalonepublish/widgets/widget_components.py b/openpype/tools/standalonepublish/widgets/widget_components.py index e6682d97aa..2ac54af4e3 100644 --- a/openpype/tools/standalonepublish/widgets/widget_components.py +++ b/openpype/tools/standalonepublish/widgets/widget_components.py @@ -160,32 +160,11 @@ def set_context(project, asset, task): os.environ["AVALON_TASK"] = task io.Session["AVALON_TASK"] = task - io.install() - - av_project = io.find_one({'type': 'project'}) - av_asset = io.find_one({ - "type": 'asset', - "name": asset - }) - - parents = av_asset['data']['parents'] - hierarchy = '' - if parents and len(parents) > 0: - hierarchy = os.path.sep.join(parents) - - os.environ["AVALON_HIERARCHY"] = hierarchy - io.Session["AVALON_HIERARCHY"] = hierarchy - - os.environ["AVALON_PROJECTCODE"] = av_project['data'].get('code', '') - io.Session["AVALON_PROJECTCODE"] = av_project['data'].get('code', '') - io.Session["current_dir"] = os.path.normpath(os.getcwd()) os.environ["AVALON_APP"] = HOST_NAME io.Session["AVALON_APP"] = HOST_NAME - io.uninstall() - def cli_publish(data, publish_paths, gui=True): PUBLISH_SCRIPT_PATH = os.path.join(