core
core copied to clipboard
Supporting Rez/Allzpark
Based on #409, this PR adds the support of Rez/Allzpark styled environment setup and application launching workflow.
Preface
Let's compare the current and up-coming launcher first.
Current Launcher:
- User selects which project/asset/task to work on, click application
- Launcher creates an instance of
avalon.pipeline.Application
and loads{app}.toml
- And compose environment
- Initialize working directory, auxiliary file copying may occur
- Finally, launch application
In Allzpark:
- User selects which project to work on, click application
- Rez resolves environment
- Launch application
The difference between these two workflows are, other than Asset/Task selecting is not in Allzpark, working directory's initialization is not there as well.
Although selecting Asset/Task after application startup can be easily accepted with the help of Avalon's Workfile app, but the bottom line of doing any task is, there must be a working directory.
So with or without asset/task, we must define a working directory path in Allzpark. But do we need to initialize it in Allzpark as well ?
By saying "in Allzpark", it means "in Rez package", which mainly used to build up environment so it's not a good fit for file system I/O related operations (it could, but not trivial).
Hence, the application that is being launched should be able to handle working directory's initialization itself.
TL;DR
So here's the goals for supporting new application launching process :
-
AVALON_ASSET
,AVALON_TASK
can be undefined - Avalon should respect and use predefined
AVALON_WORKDIR
- Working directory can be initialized by the application (e.g. Maya) itself
What's changed
-
pipeline.install
will initialize working directory if flag_AVALON_APP_INITIALIZED
is not set. -
AVALON_WORKDIR
will be respected if it's presented inSession
during install. - Avalon menu's context label will become
--, --
if asset/task is undefined. - New session schema 3.0 is added, for opt-out
AVALON_ASSET
. - ~New config schema 2.0 is added, for opt-out
apps
.~ (reverted in b6429f5) - New environment var
AVALON_SESSION_SCHEMA
is added, for adopting new workflow. - Explicitly defined environment var
AVALON_APP_NAME
in session. This isn't new, just making it clearer.
This PR does/should NOT change current workflow, just supporting new one.
Reference
Here's my current Avalon Rez package setup on adopting Allzpark :
https://github.com/davidlatwe/rez-park/blob/master/_pln/avalon/package.py
Noted that I am still using {app}.toml
files for working directory initialization, but just the part of file copying and creating default dirs.
https://github.com/davidlatwe/rez-park/tree/master/_pln/merlin/apps
Here's what it looks like :
Looks great! What's missing is a getting-started step-by-step.
E.g.
$ pip install allzpark
$ allzpark
...
Along with how to..
- Create your project/package, maybe reference the https://allzpark.com docs for in-depth details
- Link a few dependencies to your project
- How to use that project with Allzpark, to launch e.g. Maya
- Once in Maya, how to set your shot and task, along with creating the workdirs
- Profit