Skip to content

Instantly share code, notes, and snippets.

@mottosso
Created July 18, 2019 18:19
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/407a9bb839718ae8d5dcb86693522394 to your computer and use it in GitHub Desktop.
Save mottosso/407a9bb839718ae8d5dcb86693522394 to your computer and use it in GitHub Desktop.
18th July 2019 - Multi Application

Today I filled in more of the documentation and implemented the ability to switch application versions, in addition to project versions.


Application Version

One of the features missing at the moment is the ability to display multiple versions of a single applications in the GUI. Because sometimes you just need to support more than one.

I see two ways of approaching this.

  1. Make the version editable, similar to how you can currently edit package versions with a drop-down menu
  2. Draw one application per version

The advantage of (1) is famility and consistency, at the cost of more clicks. (2) is interesting, and would reduce the number of clicks. It also encourages specificity in the application specification for a project, from..

requires = ["maya-2018"]

To..

requires = ["maya==2018.0.5"]

As the former would include all minor versions of Maya in the list of applications. Which may or may not be what you wanted.

Here's what it looks like at the moment.

allzpark_multiapp


Right-Click Crash

Happens on occasion, which is a sign of threading or garbage collection issues. The way I've implemented context menus at the moment is something new I've tried, to simplify what I typically do.

menu = QtWidgets.QMenu()
kill = QtWidgets.QAction("Kill", menu)
menu.addAction(kill)
menu.move(QtGui.QCursor.pos())

picked = menu.exec_()

if picked is None:
    return  # Cancelled

if picked == kill:
	print("Perform action")

This makes the menu modal, and doesn't allow the background to be interacted with until the menu selection is complete. Seems solid enough, except for these crashes that's been happening.

20 mins later

Turns out the issue was related to either calling QMenu.exec_() or in comparing one QAction to another. Unsure of why, but I worked around it by using the QAction.triggered signal instead which hasn't crashed (yet!).


Reproducible Command

Next I had another look at being able to reproduce a resolve on another machine, primarily for rendering.

2 hours later

And presto!

  • --patch support
  • --exclude support
  • "tool" support, e.g. maya versus mayapy
  • REZ_USED_RESOLVE or REZ_USED_REQUEST options
  • Tooltip per choice for quick info

allzpark_command


Tomorrow

I also added some more context to the reproducible context to the documentation, and tomorrow I'd like to visualise which packages have a later beta version than the one currently selected.

I expect things to continue to pop up, as tomorrow is the last day of the week and we're closing in on release!

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