Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supporting Rez/Allzpark #560

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

Conversation

davidlatwe
Copy link
Collaborator

@davidlatwe davidlatwe commented Sep 3, 2020

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:

  1. User selects which project/asset/task to work on, click application
  2. Launcher creates an instance of avalon.pipeline.Application and loads {app}.toml
  3. And compose environment
  4. Initialize working directory, auxiliary file copying may occur
  5. Finally, launch application

In Allzpark:

  1. User selects which project to work on, click application
  2. Rez resolves environment
  3. 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 in Session 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 :

image

AVALON_ASSET is not required in this version
Create sub-workdirs (default_dirs) even workdir exists.
Avoid re-copy existed file.
With Allzpark, project config doesn't require [[apps]]
Remove 'AVALON_PROJECTS' since it wasn't in the original
implementation.
@davidlatwe davidlatwe changed the title Imp 409 Supporting Rez/Allzpark Sep 3, 2020
@mottosso
Copy link
Contributor

mottosso commented Sep 3, 2020

Looks great! What's missing is a getting-started step-by-step.

E.g.

$ pip install allzpark
$ allzpark
...

Along with how to..

  1. Create your project/package, maybe reference the https://allzpark.com docs for in-depth details
  2. Link a few dependencies to your project
  3. How to use that project with Allzpark, to launch e.g. Maya
  4. Once in Maya, how to set your shot and task, along with creating the workdirs
  5. Profit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants