Skip to content

Instantly share code, notes, and snippets.

@mottosso
Created June 13, 2019 06:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mottosso/9bc9a820c22887c01cadac3ad404075f to your computer and use it in GitHub Desktop.
Save mottosso/9bc9a820c22887c01cadac3ad404075f to your computer and use it in GitHub Desktop.
12th June 2019 - Ticking Boxes pt. 4

Today I ticked a few boxes and implemented another critical feature - tools.


Tools

One of the criteria for LA2 was for a single application, like Maya, to provide multiple access points, like whether to call maya or mayapy.

launchapp_tools

This feature leverages Rez's "Tools" feature, and as such the way you define what tools are made available is like this.

name = "maya"
tools = [
    "mayapy",
    "maya",
]

Whereby maya and mayapy are executables within the maya context. In this case, both maya and mayapy exists on PATH as maya.bat and mayapy.bat, with .sh for Linux.


Last Used

A minor cosmetic feature to strengthen the model/view architecture and ability to save/restore data from disk.

launchapp_lastused


Detached

As I implemented tools for the various apps, such that a single application could provide multiple ways of being run such as maya and mayapy for the Autodesk Maya app, it struck me that some applications require their own terminal, whilst others do not. Notepad is a good example of one that doesn't need a terminal. And Maya has its own terminal. But mayapy on the other hand does need a terminal. Without detached, mayapy would end up running in the same process as launchapp2 which can get a little confusing.

launchapp_detached

An alternative to this is making your executables responsible for making this distinction, which after thinking about this is likely the better approach. Each executable will either require or not require this, and isn't likely to change over time. It doesn't need to be up to the end-user, and doesn't have to be.

On Windows, this means launching e.g. maya like this.

maya.bat

call "c:\program files\autodesk\maya2018\bin\maya.exe"

And cmd which requires a terminal of its own like this.

cmd.bat

start "" cmd

Bugs

Fixed a few bugs too.

  • Fixed PySide(1) related bug for right-clicking in Packages tab, had to do with arguments differing between Qt 4 and 5.
  • Fixed launching an app after having overridden an unrelated package, e.g. Notepad when overriding Python for the Maya app.

Feedback

Got a few notes from testing out the GUI and Rez workflow overall.

  1. Help Link Small menu with a help link to Confluence and the launchapp version stored there.
  2. Sorting Ability to sort packages alphabetically
    • Note you are also able to type letters on your keyboard to quickly find a match
  3. Local versus non-Local Visual differentiation between what packages are in your personal build area and those that are on the server. Like rez context does.
  4. Project List Autofocus When no particular widget has focus, typing always means typing the name of your project, for quick access. This doesn't apply when focused in the Package tab though, as mentioned above.
  5. Visualise Rez Command The Commands tab illustrates what commands are running and their corresponding command. Make this more apparent, and enable copying of this command to replicate an environment in a terminal.
  6. Launch Command-line from any app Right-click on e.g. Maya and launch a console with that environment.
  7. Store current app with project Currently, the last-used application is automatically selected on startup of LA2. Store this default per-project, rather than globally.
  8. Hidden Apps Enable a secondary set of applications only that are hidden per default, and may be shown on-demand. Mostly for developers.

Rez Integration Refactor

Currently, LA2 requires a path to where projects reside. It then takes the name of each project and matches it against available project Rez Packages. This works, but I thought of something more flexible and intuitive. To have a dedicated directory of Rez project packages.

Before

\\server\projects
\\server\packages\td
\\server\packages\int
\\server\packages\ext

After

\\server\packages\projects
\\server\packages\td
\\server\packages\int
\\server\packages\ext

This way, not only is it made more clear what packages it's actually referring to, it also enables control over which projects are actually exposed in the GUI. Currently, every project - package available or not - is present; the ones without a package simply refuse to solve.


Tomorrow

Address the above feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment