getavalon / core

The safe post-production pipeline - https://getavalon.github.io/2.0
MIT License
218 stars 48 forks source link

[Loader] Extra control for artists - load multiple assets #346

Closed aardschok closed 4 years ago

aardschok commented 5 years ago

We have had a request from one of our artists here in the studio which is as follows: Load multiple publishes at once. When for example the artist needs a few trees in the scene or rigs of character he doesn't want to constantly press RMB and click the desired load action.

To improve the workflow and reduce the time spend loading an asset we have tried to design an extra set of controls into the application without cluttering any component of it. The main issue we hit from the get-go was the RMB; due to the current way possible loaders buildup the menu, per representation, it can get quite large. To counter that we have been playing with positioning of an extra control element.

Designs: Add all extra controls to the bottom side Image from Gyazo

Add all extra controls to the top side Image from Gyazo

Add all extra controls to the right hand side Image from Gyazo

I have create single working example of the first mentioned design: Image from Gyazo

If you have any input to improve this feature please lets discuss it below! :)

davidlatwe commented 5 years ago

I like the first one :)

Could plugin be able to bypass/ignore this controller ? If the plugin got it's own layout GUI or load counter.

mottosso commented 5 years ago

+1 for right-hand side, because that's where I'd look for it, and is akin to the layout in Maya, Nuke and Houdini. Like David suggests, I would give each loader the ability to define options for itself, that could be visualised in it's own panel to the right.

Example

class MyLoader(...):
  options = [
    api.Long("amount", default=1),
    api.Double3("smartTransform", help="Offset containers by this value", default=(5, 0, 0)),
  ]

  def do(self, *opts):
    for i in range(opts["amount"]):
      container = cmds.file(...)
      cmds.move(container, *opts["smartTransform"])
BigRoy commented 5 years ago

I would give each loader the ability to define options for itself, that could be visualised in it's own panel to the right.

This seems trickier, because each "subset" selected can have multiple representations, and each representation can have multiple loaders. Additionally one can even select multiple subsets. So specific loader options I think could be tricky - since it would have to list the options of a multitude of Loader options?

Originally I was thinking to allow CTRL + clicking a Loader action (when clicking it in the right click menu) to pop-up the amount. So it's only for that specific moment you're running it. Though problematic with that is no one would ever know about the CTRL + click functionality until explained. So it wouldn't make much sense to implement it that way.

davidlatwe commented 5 years ago

So specific loader options I think could be tricky - since it would have to list the options of a multitude of Loader options?

How about moving the load trigger from right click representation menu to the right side panel ?

Use right click menu to select the representation you want to load, then the right side panel will change it's content to display load options, and once you are happy with the load options, there is a "Load" button at the bottom of panel for you to click and actually load the representation into the scene.

This may far beyond what currently needs to solve the issue, but what does this sounds ? Could be the future develop direction ?

davidlatwe commented 5 years ago

But... if the options is on the right hand side, where would comment history go ?

aardschok commented 5 years ago

How about moving the load trigger from right click representation menu to the right side panel ?

I like the speed of things with RMB menu, it's a intuitive way to load thing. The control panel is interesting enough for me to give it a try and see how it would work and be received by the users. I would however step away from RMB> Pick representation and create a set of buttons in the control box.

For me the ideal flow for would be:

But... if the options is on the right hand side, where would comment history go ?

How about tabs? Similar to the silos, one tab for comment history and one tab for controls. I think it is a decent solution.

aardschok commented 5 years ago

I created a mock up for it in Photoshop: Image from Gyazo

mottosso commented 5 years ago

Oo, I really like that. <3

aardschok commented 5 years ago

Created two prototypes from the previous design in Qt

Normal: Image from Gyazo

Flipped panel: Image from Gyazo

aardschok commented 5 years ago

Oo, I really like that. <3

Functioning prototype: Image from Gyazo

Will need to setup the logic to discover control options from the loaders.

davidlatwe commented 5 years ago

Wonderful !!

mkolar commented 5 years ago

Hey guys. has this ever moved any further? I have artists asking for the same stuff. If it's somewhat finished but untested or needs some polishing and @aardschok doesn't have time, maybe we can take over and finish it of.

BigRoy commented 5 years ago

We dropped the development of it at the time as it still felt like a bit of a clutter - and it made only sense in very rare situations, here's @aardschok 's branch related to this though: https://github.com/aardschok/core/tree/PLN-121

What's your exact use case @mkolar ?

davidlatwe commented 4 years ago

@BigRoy Is this being used in Colorbleed ?

BigRoy commented 4 years ago

@davidlatwe We haven't developed this any further no. So we're not using it currently. Do you have any direct use case?

davidlatwe commented 4 years ago

Yeah, we have artists here asking for batch load on one subset.

Currently trying to implement this feature with QWidgetAction, hoping that I could come up with something like Maya's option box, which will pop-up a dialog displaying loader plugin options.

image

And that option box will not appear if multiple subsets or assets being selected, or the loader plugin does not has options.

davidlatwe commented 4 years ago

Here's what I have now.

Currently no option widgets implemented yet, just a base dialog and simple loading result (printing representation Id).

optional_actions

Note that the loader will wait till the dialog been accepted, so the loader should be able to get options from dialog.

Visually looks like Maya's option box, and the current workflow seems good to me, was referenced from @mottosso's comment above.

But not so sure about what type of data should use what type of widget to represent on dialog, like, using QSpinBox for int ? QLineEdit for string ?

davidlatwe commented 4 years ago

Implemented in #482, closing this :rocket: