getavalon / core

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

Asset multiselection in loader #550

Closed iLLiCiTiT closed 1 month ago

iLLiCiTiT commented 4 years ago

Feature: Multiselection of assets in loader

With this feature it is possible to load multiple subsets from multiple assets at once. 65226426-1eb47200-dac7-11e9-80f8-ad4f5f4f5a35

This feature is used only in loader, rest of tools should work the same (visually) as before and if only one asset is selected then nothing should change too.

How it works (basics):

RESOLVES: https://github.com/getavalon/core/issues/453

davidlatwe commented 4 years ago

Had a try on this feature, it looks like the original subset groups gets un-grouped if multiple assets selected.

c5ee4a7c-d7d0-4c16-9cbb-d82c0f827267

It is not possible to see subset groups when multiple assets are selected.

Just saw this line at the end. XD

This might be a problem for my studio, the artists here sometimes produce subsets that were just for testing or marking them as deprecated in subset groups which named like "Trash Bin" or "Tests". Some of them are used to grouping for lighting artists to let them know which needs to load for rendering that shot.

If those subsets that should have been hidden or packed will re-appear when enabled multi-assets selecting, then it's kind of like backward incompatible in UX.

Could you elaborate a bit more about why it is not possible ? The first problem that I can think of is how to visualize two different subset grouping motive in one view, and yes, it is really tricky.

davidlatwe commented 4 years ago

One potential solution would be to change the subset grouping's visual implementation from group item in subset tree view to leaf item in asset tree view.

The goal of subset grouping was like creating visual partitions inside each asset, so it should also be reasonable if the grouping gets implemented in asset tree view, like the leaf item at the end of any asset branch.

Let's change the term from subset group to asset partition for now.

And we could even treat that asset partition like a normal asset, and grouping same named subset in subset tree view when using multi-asset selecting.

Seems like a good way to go !

iLLiCiTiT commented 4 years ago

Let's change the term from subset group to asset partition for now.

So, you're saying, that subset groups won't be shown in subset view but will be kind of "children" visualization in asset view?

davidlatwe commented 4 years ago

So, you're saying, that subset groups won't be shown in subset view but will be kind of "children" visualization in asset view?

Yes, that's right !

davidlatwe commented 4 years ago

Let's change the term from subset group to asset partition for now.

I think we have to resolve the visual subset grouping conflict befroe merging this, so I'll try submit an issue with a proof of concept for asset partition.

iLLiCiTiT commented 4 years ago

I think we have to resolve the visual subset grouping conflict befroe merging

It looks like asset partition is similar idea to visualParent concept.

davidlatwe commented 4 years ago

Yeah, but it's at the end of the asset's hierarchy.

mkolar commented 4 years ago

Truth be told I'd prefer thinking of a different solution, rather than moving the groups under assets. It is not very consistent, especially when you only have some subsets in group and others are not. We use the grouping for render AOVs for example. Having all of the subsets under assets, but having to click one level lower for renders feel very counter-intuitive.

We actually have a way of dealing with "deprecated" in a different way. Rather than grouping them and just relying on the artist to name the trash group consistently, we change the type in mongo from subset or asset to archived_subset, archived_asset. That way they automatically drop out of the GUI, but stay in the system.

The question is whether it is not more systematic to allow for doing this from the loader and giving the option to "un-archive" from there when needed as well. That would solve the first issue with your bin group workflow.

The second of course is the fact that it would be great to preserve both behaviours at the same time, but it could be though out properly how to do it visually. Should the group show above the dynamic multiselection grouping, or bellow for example?

That being said let's think of how to actually do this with full compatibility of course. Just wanted to throw the archive approach out there

mkolar commented 4 years ago

We had a good old school paper brainstorm in the office and thin we have an elegant solution, we'll try to implement.

If you have existing groups, we'll treat them similarly as subsets and when you select multiple assets, we will visually keep any groups in the subset view and only group subsets themselves one level lower. That way, if multiple assets share the same groups and subsets, we should be able to fully keep that hierarchy. Of course if asset 1 has group1/modelMain while asset 2 has modelMain mong subsets. These two won't be considered as equivalent in multiselection if the enable grouping tickbox is on. Once it's turned off, they will be consider as equivalent in the same way as current implementation.

This way we should keep best of both worlds and on top of that let the artist choose what the prefer by switching the grouping tickbox on and off.

davidlatwe commented 4 years ago

Sorry for late reply, was on vaca pass few days. ☺️

If you have existing groups, we'll treat them similarly as subsets and when you select multiple assets, we will visually keep any groups in the subset view and only group subsets themselves one level lower.

I did think of that path, but I was worried that pushing existing subset groups one level lower would complecate codes, and maybe or maybe not, require a few more clicks for user to expand groups and see what's in it.

The reason why I proposing asset partitioning was mostly because it's easier to implement and maintain in my imaging, and the GUI interaction result is also easier to match user's expectaion when involving multi-assets selection.

davidlatwe commented 4 years ago

I did think of that path, but I was worried that pushing existing subset groups one level lower would complecate codes

Having that said, maybe I was thinking wrong. I'll see if I could implement the asset partition and trying both ways for the best outcome.

BigRoy commented 4 years ago

Would love to know where we're at with this feature.

iLLiCiTiT commented 4 years ago

Would love to know where we're at with this feature.

We though about solution and there is one, but we have to find spare time for implementation.

iLLiCiTiT commented 3 years ago

Updated code but don't have ready testing environment to realy check if I did it right. Can someone test, please?

davidlatwe commented 3 years ago

I checked out this branch directly and looks like the data was loaded correctly, but the view can not show anything ? But there are colored underlines on selected assets when I selecting subsets blindly.

image

No error messages from console, not sure what problem would it be, updating PyQt5 version doesn't resolve this.

Update Right clicking subset view shows "No compatible loaders for your selection."

davidlatwe commented 3 years ago

I comment out these lines and the subset widget is showing stuff now.

https://github.com/getavalon/core/blob/4f6c897520c41b8bd01b2f995f55503e7ccec99c/avalon/tools/loader/widgets.py#L360-L366

Looks like the problem was the loading screen didn't go off. :D

iLLiCiTiT commented 3 years ago

but the view can not show anything

My fault, forgot to add few lines.

Looks like the problem was the loading screen didn't go off. :D

The issue was that loading state was never set, so is_empty was always True.

davidlatwe commented 3 years ago

Thanks ! Just had another quick test, can confirm that works now. But sometimes (really rare, but happens) the loading screen still there.

Anyway, I'll try reviewing this one ASAP.