-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sections #58
base: master
Are you sure you want to change the base?
Sections #58
Conversation
Awesome! Some things I found to think about, some obvious, some not.
|
Thanks @mottosso Most sound obvious and they are good ideas. I was thinking also at the very least have something like a counter of amount of plugins in the header. Like Collectors (12), Validator(3) and something that visually would show the success/failure states, maybe even like a progress bar in the header.
A visual indicator (the toggle triangle) can be enabled by having The collapsed state is a tricky one. Basically you'll want to "expand" at certain processing times, because you can't expand by default (as far as I know). Since the data isn't present from the very beginning one can't just
With that information know I believe we know how far we need to push with 2.
This sounds related to that the instances can't be toggled yet, as that isn't implemented correctly from the change between List to Tree. |
This can happen as soon as |
Add FamilyGroupProxy to list only first family for instances Fix checkbox updating by implementing setData on proxy Always expandAll (for now) Fix Proxy.is_header method
Some slight changes to get closer to our wanted result. Currently after collection and validation it looks like this: Changes:
Todo:
|
Awesome!! At first I was looking at the screenshot thinking it was pyblish-qml, and that you wanted to contrast the two. |
That's great. I just took the Item delegate and built a Section delegate using that as template and looked Qml to see what the result was there and tried to make it look similar. I guess so far so good. Still need to fix up some things, just so few hours in a day especially aside of work. :) |
So it seems like we might be running into an issue here. I've tested @BigRoy's code and it's only running with pyside which as we all know by now, has been dropped in maya 2017 in favour of PySide2. From a quick look it might just be some scrabmled classes that were moved to different modules in PySide2, however I can't find proper documentation on these changes. I managed to get the UI to show in maya 2017, but it's not liking the QAbstractProxyModel class and keeps erroring out on that. |
Have you also given PyQt5 a try? It should work with that as well. Though, like with Maya pre-2017, it will need to be a PyQt5 compiled for the version of Maya you are using.
Looks like you've found another misplaced class in PySide2! I'm helping the guys getting these sorted out, luckily there are (1) less misplacement than PySide1 and (2) developers available to actually do something about it. Till then, can you go here, and add this remapping section, along with this: QtCore.QAbstractProxyModel = QtGui.QAbstractProxyModel That should solve it. |
My bad. Problem is somewhere else. QAbsractProxyModel is correctly in QtCore after multiple checks. However the treeview in pyblish-lite still doesn't get populated. This time due to:
|
Linking to related issue in Qt.py Looks like there's some incompatibility elsewhere. @BigRoy, are you able to take a look? |
Sounds like there's a left-over call to It was in a somewhat early-test stage as I noticed some errors still popping up, but I think with the latest fixes to the proxy models those all moved away as it started working like any of the original models.
Not to investigate on short-term, but I'm keeping an eye on this conversation. ;) I'll try to investigate somewhere this weekend or early next week if I have the time. |
Sounds like that's the root of this. Will have to investigate a bit on how this operates in newer Qt versions. Thanks for investigating! |
Yeah. It works fine in maya 2016, 2016ext2 and nuke. Certainly the issue that @mottosso found with missing reset() |
Looking at Qt5 docs I think it's the The Or actually no. I think it's As far as I can tell both of the above should work. Do you know the difference between those methods? |
@BigRoy BINGO. I've tried using |
Thank @mkolar! Feel free to comment on the rest of the functionality and please test overall stability. Hope to get the goals straight to have this working as a stable implementation so we can start having a look at actually getting a good pull request going here, instead of the messy WIP state I started. 👍 |
Nonsense! This is an excellent way to do PR's. We'll simply merge once it's pretty, and discuss along the way. Wip away! |
I've tried digging into this, but found myself overwhelmed by the complexity at the moment. @BigRoy do you think it would be possible to either (1) explain the core components of what makes this work so that I or someone could continue from where you left off or (2) simplify the code slightly to make it easier to understand? |
I'll have another look at cleaning and simplifying this to the bare necessities! Or at least have a look at what is unclear in the current state. |
If it helps, I think the main struggle I had was to understand the relationship of the generated tree in the proxy and the original items. How the name is forwarded from this item to the view, for example. |
Had another request for this from new users. Any progress on it? Seems like this is close to a merge. |
This ball is in @BigRoy's court. |
Unfortunately I personally haven't found the time to continue working on this. The code should be close to a working version, albeit slightly quick and dirty as I recall it. If you've more time on your hands feel free to pull the PR to your own repo and refactor some of it... otherwise I hope to find some time soon, though looking at how long this has been open I'm not too confident I'll get into it soon, again. |
@mkolar are you using this feature? :) Just wondering. |
sections are used in openpype's version of pyblish lite, the PR is still open #109 |
Experimental implementation for creating section headers as described in #21.
This implements a GroupByProxy that can group a (flat list) Model by a data role into a tree of sections and the original items.
Additionally this changes the
QListView
over to aQTreeView
to retrieve the nesting functionality for the visuals.