Applications: Use prelaunch hooks to extract environments (#5387)

* ApplicationManager can have more granular way how applications are launched

* executable is optional to be able create ApplicationLaunchContext

* launch context can run prelaunch hooks without launching application

* 'get_app_environments_for_context' is using launch context to prepare environments

* added 'launch_type' as one of filtering options for LaunchHook

* added 'local' launch type filter to existing launch hooks

* define 'automated' launch type in remote publish function

* modified publish and extract environments cli commands

* launch types are only for local by default

* fix import

* fix launch types of global host data

* change order or kwargs

* change unreal filter attribute
This commit is contained in:
Jakub Trllo 2023-08-03 10:04:15 +02:00 committed by GitHub
parent 55aead8470
commit 7e9f42b447
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
35 changed files with 266 additions and 152 deletions

View file

@ -2,7 +2,8 @@ import os
import shutil
import winreg
import subprocess
from openpype.lib import PreLaunchHook, get_openpype_execute_args
from openpype.lib import get_openpype_execute_args
from openpype.lib.applications import PreLaunchHook, LaunchTypes
from openpype.hosts.celaction import scripts
CELACTION_SCRIPTS_DIR = os.path.dirname(
@ -16,6 +17,7 @@ class CelactionPrelaunchHook(PreLaunchHook):
"""
app_groups = ["celaction"]
platforms = ["windows"]
launch_types = {LaunchTypes.local}
def execute(self):
asset_doc = self.data["asset_doc"]