Closed davidlatwe closed 5 years ago
Could you elaborate on what you mean with dependency view and how you imagine it looking like?
Thanks @tokejepsen :D
Here's some latest progress on hierarchy view...
Sorry, I'm not actually very useful when it comes to feedback on the Loader since I've yet to try it.
Unrelated to the review, what are those red boxes in your outliner?
Unrelated to the review, what are those red boxes in your outliner?
Oh, it's the referenced subset's group node, nothing fancy except with a custom icon for artist to identify them. :) Thanks !
Oh, it's the referenced subset's group node, nothing fancy except with a custom icon for artist to identify them. :)
Clever!
Have been unable to check the code yet though but visually it looks like there's quite some stuff here that could be interesting.
Just want to say, this is stellar work @davidlatwe! I wish I had this in the pipeline I'm sitting in at the moment (shotgun toolkit, yuk!)
I have changed the implementation of Hierarchy view from affecting all containers with a checkbox, to able to cherry-pick with right-click action.
You can keep cherry-picking as long as there are item to select, and maintain the selection. If the host does not have the concept of hierarchical containers, still able to use as cherry-pick only.
One minor tweaks:
expand all
and collapse all
actions, if no item been highlighted. Only when there are highlighted selection will show full menu.Thanks @mottosso :D, new year is coming, my new year gift from asset artists is counting on this ! (JK)
I have edited the previous comment to point out one minor tweak.
Finally, I hope the combing of cherry-pick and hierarchical view make sense to you guys, I personally pretty happy about this re-implement, since there's only a few types of subset have nested containers, and cherry-picking things could help on managing big scene I believe (able to view in small portion). And the cherry-pick works for all hosts, which I think it's really nice. :)
Here's final sums up about this PR:
host
to support hierarchy)"%s_%s: (%s)"
to "%s . %s: (%s)"
(8135f92)name
to Name
, remapped the container "namespace"
to item "Name"
. (d5b5ab8)Great work @davidlatwe!
Some notes from my end on that last summary:
Cherry-Pickable View with hierarchy visualization (Require host to support hierarchy)
So the Cherry-Pick is like an "isolate view", right? It seems nice.
Would it be possible to somehow support the cherry pick being enabled by a specific search query in the filter? Like it would push in "pick:asset-x" in the Search bar so that the proxy automatically filters it.
Did you Implement the Cherry Picking through a Proxy Model? (didn't check the code yet)
Here's a reference for some Query language ideas: https://www.jetbrains.com/help/youtrack/incloud/Search-and-Command-Attributes.html
I was referring to something along those lines.
Moved custom actions sub-menu to the top of right click menu for faster access.
I wouldn't be a fan of this actually. I'd still prioritize the other actions as the ones the Artist would most likely end up using.
Child item name and version color is dimmed.
In the gif to me the children seem "greyed out" and I'm seeing them as "unloaded". Maybe it's just something to get used too - just wanted to let you know how it feels by just looking at the gif. It's a nice helper, but maybe it's slightly dimmed too far?
- So the Cherry-Pick is like an "isolate view", right? It seems nice.
Oh yes ! That's the word I should choose it at first !
I'd like to change the action label from Cherry-Pick (Hierarchy)
to Isolate (Hierarchy)
, it's a much common term for artist, right ?
- Would it be possible to somehow support the cherry pick being enabled by a specific search query in the filter?
- Did you Implement the Cherry Picking through a Proxy Model?
No, not by Proxy Model, it's by passing a set of objectName
to the TreeModel's refresh
, then filtering against all the containers collected from host.ls()
.
Something like this:
# app.py
class View(QTreeView):
def enter_hierarchy(self, items):
# Action to enter isolate view
self._selected = set(i["objectName"] for i in items)
self._hierarchy_view = True # Will make `refresh` to take `selected` items
self.hierarchy_view.emit(True)
self.data_changed.emit() # Trigger the `refresh`
# model.py
class InventoryModel(TreeModel):
def refresh(self, selected=None):
items = host.ls()
if self._hierarchy_view and selected:
# Filtering & child container collecting
...
# Build Tree
while items:
...
self.add_items(children, parent)
...
else:
# Build Tree
self.add_items(items)
So no, I don't think search query can support this. Since it require to rebuild the model to visualize the hierarchy. :P
- I'd still prioritize the other actions as the ones the Artist would most likely end up using.
Yeah, it's true that the other default actions indeed use more often, but what I think was the custom action might be used repeatedly, depend on the function of that action, if there's some action is for selecting or diagnose-like function, then it would be repeatedly accessed. Hmmm, having that said, or maybe I shouldn't put such action in there at first place ?
- maybe it's slightly dimmed too far?
Yeah, a bit too far I agreed, perhaps I'll try increasing the row spacing, instead of dimming the color.
Thanks for the feedback @BigRoy !!
- I'd still prioritize the other actions as the ones the Artist would most likely end up using.
Hmmm, I'll revert it back to the original position, since I think the user experience is much more at Colorbleed of course. I shall make it stay that way :)
Hmmm, I'll revert it back to the original position, since I think the user experience is much more at Colorbleed of course. I shall make it stay that way :)
Well, it's not only a Colorbleed thing of course. The Avalon core should be much wider than that and targeted much wider too. Anyhow, my feeling is if the actions are so particularly important to be under the tip of the fingers it might be even weird that they are in a submenu? ;)
I'd be happy to run it past the team to double check if you have some good arguments as to why the Actions submenu should be at the top.
Hmmm, having that said, or maybe I shouldn't put such action in there at first place ?
Yes, maybe if it's to be used so often it shouldn't be in a submenu?
So no, I don't think search query can support this. Since it require to rebuild the model to visualize the hierarchy. :P
What in particular is it rebuilding? It's (re)moving the top root nodes, right? I think even that could be possible with a AbstractProxyModel but I can see why it might be even more complex than just doing it in the top model. Note that a ProxyModel could even introduce new items (like perform grouping) but you'd have to write the proxy model yourself.
The code you have for now seems fine though.
I think I have a good start on implementing different view via search query, kind of fun.
Here's a rough demo.
With $
, will display hierarchy view, and adding one digit will expand to that depth. (Not picked-able yet)
With #
will auto expand normal view.
With @
will enter headless (group-less) view.
I think we could define some simple query expression, like $<depth> <asset1> <asset2> : <subset>
some sort.
What do you think ?
Would it be possible to keep PRs as small and contained as possible, before introducing more features?
I think the search is good, but am a little concerned it doesn't handle a busy network or server very well. A Proxy model would contain processing to the local machine, and there should probably also be some delay between typing the search query and actually performing the search, so that when a network takes 500 ms to reply typing doesn't appear sluggish.
Would it be possible to keep PRs as small and contained as possible, before introducing more features?
Ah yes, the latest commit should be a good stop point. Thanks for the heads up. :)
there should probably also be some delay between typing the search query and actually performing the search
About that, till the latest commit, it could happen when preforming cherry-pick action, since it will refresh
the model, which will have database access.
As for the search query implementation above, the data model get built for all view modes only once at startup until next refresh or data change, when changing view with typing $
@
or #
, there only preformed source model shifting.
But in both cases, when typing the keyword to filter out unwanted assets, it's handled in local pre-built model (filter proxy model), so won't be any latency. :P
The search query looks cool!
Is it based on any existing query language?
Is it based on any existing query language?
No, currently not, just got the idea from @BigRoy and trying a workable startup, and only defined those symbols which will not be used in asset naming, for differing default Regex search. Should be another issue for this. :)
Final updates:
If no other objections, I'll merge this next week (probably Tuesday) :)
About to merging this :)
This enables a better view for hierarchical (nested) subset type like
setdress
in Scene Inventory App. Able to switch between normal flat view and hierarchy view.Outdated
![hierarchy_view](https://user-images.githubusercontent.com/3357009/48304452-bc105280-e554-11e8-905f-837374d57e5d.gif)Jump to latest