Global Session
Goal
Simplify entering of environments and application start-up.
Implementation
At the moment, an application such as Maya is executable from both the operating system, such as the Windows Start-Menu, and Launcher - the Avalon application launcher.
Launcher enables applications to be started given a series of environment variables that help determine what goes into it and what comes out of it, such as assets from a particular project in a particular department. It does however replace some already familiar behavior, the launching of software.
We couldn't just rely on the user running the maya.exe from the installation folder, as it would take away our ability as pipeline developers and maintainers to customise their experience.
However, what if Launcher was stripped of the ability to launch software and left only with the ability to customise an environment, doing so at a global level? Modifying the current environment variables set by the operating system? That way, we would be in control over the environment, whilst still enabling the artist to launch software by clicking Start -> Autodesk Maya.
The upsides are a few.
- No application is launched outside of a context, even if that means a default context within which they are able to retroactively change their environment from within the application
- Native interface on each platform. The artist could decorate their start menu or the like in the way they are already familiar with doing. Or launch things from a terminal, without special treatment.
- For us, less maintenance as we no longer have to worry about launching or monitoring launched software.
The downsides are a few.
- No control over what application or version is available to a given project
- No monitoring or control over launched applications. At the moment, Launcher keeps track of applications and their running status, but does not visualise it. There is room for innovation and interesting control metrics, such as grouping and naming of various applications in scenarios where an artist have many Houdini's and Zbrush's running.
- At the moment, application directories are created by the Launcher prior to starting an application, enabling us to set the current working directory to something relevant. It can be worked around by having a static start-up script look at the current global environment, creating directories and running
os.chdir. But odds are changing the CWD for Python isn't the same as the application that embeds Python for some applications.
Simplifying launching and entering environments is always a good idea. The easier artists have it the less likely they are to try to work around the system. However I have a feeling that this would actually introduce more complexity on artist side at the expense of very few advantages.
Native interface on each platform. The artist could decorate their start menu or the like in the way they are already familiar with doing. Or launch things from a terminal, without special treatment.
On the contrary I see this as disadvantage. Unified gui between platforms make it easier to work cross platform. we might have houdini artist who's used to windows, but needs to do a shot on linux due to performance for example. A launcher gives him familiar space he knows from his windows machine.
even if that means a default context within which they are able to retroactively change their environment from within the application
this would have to be the way around it probably. But should be implemented anyways. (not sure if it already is). Ability to change context without leaving the app when switching between assets speeds things up a lot.
In general it feels too much of an distruption of global computer environment, where you wouldn't be quite sure what's going on. If I want to launch vanilla maya for instance, how would I go about it?
Maybe a better way to simplify this process would be to work on GUI of the launcher and task selector to make it nice to use? Also keep in mind that other systems like ftrack or shotgun will eventually be injected into this process most probably, so at least keeping the option of launching an app from task should stay one way or another.
In general it feels too much of an distruption of global computer environment, where you wouldn't be quite sure what's going on. If I want to launch vanilla maya for instance, how would I go about it?
Or even worse, say you'd be working on two different projects at once which each would need a different environment initialized.
Also note, that different applications might require different environments. E.g. I would load Maya with a different environment than Nuke.
Even though it sounds interesting, I'm not sure how it could be managed in an artist-friendly way. (Unless maybe one is working "inside a project's environment" for a much longer period, e.g. a couple of months or even just weeks). Though switching assets happens a lot during each day, or even switchting projects can happen many times in a single day.
Ability to change context without leaving the app when switching between assets speeds things up a lot.
If we can get this safely then 👍. Though I can see why one can't make that assumption. (unless a single project will always maintain a single "environment" per app)
Maybe a better way to simplify this process would be to work on GUI of the launcher and task selector to make it nice to use?
There will still be many "personal preferences" between studios I believe. I think the most important bit to handle is to set up a way on how to manage the environment. Currently only the Loader can do it, through its gui, whereas it should be an API. Say we wanted to initialize the exact maya launch without the GUI at all, that should be trivial I believe. Currently it hardly is.
Even though it sounds interesting, I'm not sure how it could be managed in an artist-friendly way.
Ah, I never mentioned what I had in mind.
I'm thinking a taskbar icon with info on current environment, and a popup like Dropbox for changing it. That way, you set it, launch apps and change it again for some other app. The app would then keep track of the environment within which it was launched, as it would with the current Launcher as well.
I'm not convinced this is the way to go, I mostly wanted document it so we've had the conversation. It's an option, I haven't seen anyone do it and it could because its terrible, or because no one has thought of it.
Also note, that different applications might require different environments. E.g. I would load Maya with a different environment than Nuke.
The application can manage that regardless, by reading the env on startup and doing it's thing.
Currently only the Loader can do it, through its gui, whereas it should be an API. Say we wanted to initialize the exact maya launch without the GUI at all, that should be trivial I believe. Currently it hardly is.
that's the main thing why we haven't started playing with avalon properly yet here. We'll have to make a connection to ftrack work (even if it's just launching at the start), so API for this will be crucial and I can't find the time to fully look into it for now unfortunately.
so API for this will be crucial
Let's pop up a dedicated issue for this, it isn't something I've personally had a use for yet but expect to make an appearance as soon as someone needs it.
I'm thinking a taskbar icon with info on current environment, and a popup like Dropbox for changing it.
Sounds a bit like Shotgun Desktop? https://support.shotgunsoftware.com/hc/en-us/articles/219040668-Desktop-Download-and-Setup
Sounds a bit like Shotgun Desktop?
and ftrack connect. Although no-one really uses it that way.
Does getavalon/core#189 relative to this ?