davidlatwe / rez-packages

GNU General Public License v3.0
7 stars 1 forks source link

Avalon, Rez and Allzpark #1

Open davidlatwe opened 4 years ago

davidlatwe commented 4 years ago

Goal

Figure out a way to bind these three beasts with minimum code change. See https://github.com/getavalon/core/issues/409 for more background.

Problems

  1. Application .toml

    Although we could define DCC Apps and DCC plugins into Rez packages, which supersedes Application TOML's functionality on providing environment variables.

    But those TOML also defined which file needs to be copied while initializing the workspace, e.g. Maya's workspace.mel. And defined what default_dirs needs to be created.

    Other than that, avalon.pipeline.Application class will be used in Avalon's Workfile App, which is a TOML based application startup implementation.

  2. AVALON_WORKDIR

    Avalon Launcher uses avalon.pipeline.Application with environment variables like AVALON_ASSET, AVALON_TASK which given by Launcher GUI input, and a path template in project config document (saved in database) to compose the working directory path.

    In Rez and Allzpark, work dir template path can be defined in profile package (should be), but AVALON_ASSET, AVALON_TASK may still remain undecided.

davidlatwe commented 4 years ago

One possible option that might not need to change Avalon:

Implement a script in Avalon package, that act like Launcher, but with default asset, task filled, e.g. _Lobby, general.

And in each DCC App package, change tools to be a late bind function to allow other package to inject additional tool, e.g. Maya, by environment variable MAYA_ADDITIONAL_REZ_TOOLS.

Avalon package will inject that Launcher-like tool into Maya package.

Once user launch Maya by that tool, Workfile App pops up, change to the recently accessed asset/task if any.

davidlatwe commented 4 years ago

Update Avalon project document on Allzpark profile package build

Currently I use a tool called party and a Rez repository plugin called mongozark that ship with rez-ozark to build and install profile package.

Maybe I could implement a build location callback to do the Avalon database sync after profile being built. For example, say I use this command to build Avalon project profile package :

$ rez-env ozark -- party --at avalon

The profile install location in above example is avalon. Once profile package has been written out, the tool find the callback that registered with the location name avalon in rezconfig's mongozark plugin section, and run that callback to update Avalon project document.