Page MenuHome

Collection Manager
Open, NormalPublic

Description

This is a collection manager that I created for my larger addon Advanced UI Menus (https://blenderartists.org/t/addon-advanced-ui-menus/592865). I believe I read somewhere that blender was looking for a better way to work with collections in the 3D Viewport; so, this is my solution to that problem.

This addon provides a popup window that includes a treeview (made out of a UIList and operators) with functions to add collections and subcollections, rename collections, move objects to collections, exclude collections, restrict selection on collections, hide collections, and remove collections. It correctly handles collection chains and allows you to isolate collections by shift-clicking, and you can move objects to multiple collections via shift-clicking as well. The addon will also show you what collections are visible and what collections the selected objects are in. In addition it will not allow objects to be removed from all collections entirely. All of the functionality is documented by tooltips, so if you open the collection manager and just hover over stuff you will be able to easily learn all of it's advanced functionality. And as a final note, the window will size itself based on the depth of collections so nothing gets squished.

Details

Type
Patch

Event Timeline

Brendon Murphy (meta-androcto) triaged this task as Normal priority.

hi, this looks quite good, I'll test it out shortly :)
@William Reynish (billreynish) is this something you would be interested in?

Well, Brendon, nice to see you are interested in solving an issue, thank you for invitation.
We are really appreciate that!

But there is a problem - to solve the problem, you need to determine exactly what the problem is.

This is not a “discomfort”, it is complete workflow problem and includes several issues that allow to perform complex work processes of a certain type in Blender, inaccessible to any other software.
Deep historic restoration relates to that workflow type, so several museums, like Smithsonian and Hermitage are currently involved in negotiations about multiple issues of complex workflows in 2.8

This solution, (like Pablo Vazquez[[ https://github.com/venomgfx/addonitos/blob/master/collection_quickies.py | widget ]]) seems to solve nothing of them.
Sorry.


If to speak in collection management terms, without special workflow context - it feels much better than default.

We love ability to filer name - this is what we consider necessary by default for scenes that can easily contain thousands of collections.
It works only for disclosed paragraphs, so don't allow to find a collection in entire scene (like materials filtering does), but filtering idea it is a very nice step!

Also we love solid design of it. It is looking good, and handy. A good job!
It's UI confidently holds up to 7 levels of enclosure, and this is pretty much enough for most of cases. Default solution provides better unlimited capacity, but in a less presentable way.
Don't know if window resizing can solve that, it will also have a limit, so it is a usability solution vs capacity solution issue.

Isolating ability by pressing shift+hide (eye) button is also nice idea, but the problem is that it doesnot restores previous setup on second click.
There are several ways to view everyting in blender, but switch back to previous setup requires undo (which is dangerous and need accuracy) or managing View layers (which is long way, and also needs accuracy).
So there is no way currently to quiclky check up what is in some collection, and return to previous configured state, which is quite critical since there are dozens of them, and their content needs for attention.

Same thing for exclude collection checkbox .
Also would be nice to have "Restore on exit" checkbox, that will bring ability to eliminate all changes on window closing, like AutoCAD LAYWALK function's window have.

It also have numeration addressing broken, so M5 shortcut to send object to collection, visible by pressing 5 is also not working yet. We call this "M5" issue.
It is essential for creating temporal layouts, raking tons of unnamed items from imported scenes, or quick separation of exact contexts in complex projects.

Finished editing post. Sorry about my english, it is foreign for me)

Hi @Paul Kotelevets (1D_Inc) I'm the creator of the Collection Manager addon. Thank you for the compliments.
This addon was designed with artists in mind, not deep historic restoration; however, since it sounds like the Collection Manager is close to what you are looking for, maybe I can work with you to improve it to accommodate your workflow.

First off the window will size its width to fit the collections accumulated depth, but blender does not allow it to do that while the window is open. If you manually add more child collections than the width will comfortably accommodate it will start to squish up, but if you close it and open it again, you will find that it has resized its width to fit its expanded contents.

You are correct that the second shift click does not restore the previous state, but enables all collections. It would be easy to make it restore the previous state, and would probably make more sense to do so. If no one objects to this behavior, I will implement it. If it does get implemented I will probably add a button to enable all collections at the top, The same goes for hiding.

I'm not familiar with AutoCAD, so I don't know about "Restore on exit". If you can describe it to me more in depth (what does it restore exactly? Visibility? Collections select status? New/deleted collections undone? Something else?), I can see about adding it.

I have no idea about this "M5" issue and I don't know if it's a problem with blender or my addon. If you can describe it in more detail I would be willing to see if something can be worked out to fix it.

The filtering is a byproduct of using a UIList. I didn't even expect it to get used (which was probably naive on my part). That said, I think there may be more that could be done to improve it. Again, if you can describe what you want in more detail I may be able to implement it.

You were right when you said that "To solve the problem, you need to determine exactly what the problem is." I don't know what the problem is. But if you are willing to explain it, I'm willing to try to solve it.

Hi! Nice to meet you)

This addon was designed with artists in mind, not deep historic restoration

Of course, a lot of things are designed for average workflows) It's whatever.
Average don't need all those proper tests with timings, actions per second, perception speed and so on.
However, hard workflows design includes averages, but average workflows design can't support hard.

First off the window will size its width to fit the collections accumulated depth

Don't know, what about horizontal scrollbar? Is it possible?)

You are correct that the second shift click does not restore the previous state...

Well, I thing it would be nice mostly for outliner, as it allows to navigate the scene.
Check up this proposal, it can be interesting and fresh.

I'm not familiar with AutoCAD, so I don't know about "Restore on exit".

It works simple - checkbox allows to decline all visibility changes, that was made since window was open.
When M window closes - visibility changes made in M window has gone.
You can find video about LAYWALK command in Layer Maniphest topic post.

I have no idea about this "M5"

That's easy. Create 5 boxes, put them to 5 collections - press 1 2 3 on top row of keyboard numbers.
You will see that some collection, numbered as 1 2 or 3 is isolated when you pressing number key.
Those 1 2 3 thing are "slots". They are needed for a very important thing, called "Concave workflow".

So, selecting some box and pressing M5 should send that box to collection, that is visible by pressing 5.
Pressing Shift+M, 234 should also add it to collections in slots 2,3 and 4.
That's it)

The filtering is a byproduct of using a UIList.

Well, you already made an "Expand" button, that technically solves filtering issue - so we are already able to find matching pattern is all scene's collections, and even see it's enclosing level. That's good job!)
I guess you understand how useful it will be in 1000 collection's file. I think, it will allow to survive in such files at some point =)

You were right when you said that "To solve the problem, you need to determine exactly what the problem is."

Well, complex systems requires proper proposals and tests.
We've spent a year to define what's wrong with QCD system and how it can be repaired in an easiest way.
We've spent a decade to finally bring proper snap proposal.

You are making a nice job, fixing things at some point you can observe. You are already doing your best)

hi @Paul Kotelevets (1D_Inc) thanks for the feedback. It's appreciated.
I guess as addons devs we can only do so much until proper decisions and functions are in place. I saw this some time ago with the original layer manager addon by fourmadmen. My argue then for the Layer Manager addon was simple: We don't have this functionality, here's something to help users on the way until it gets built in. It's incredible that it was 10 years ago. https://developer.blender.org/T18565
I'm about to remove the old Layer Manager addon from Blender as it's broken and unmaintained in it's current form. It was with this in mind that I asked @Ryan Inch (Imaginer) to submit his addon here.
I see this as a good opportunity to both examine the new methods and make a reasonable attempt to provide something if needed. No doubt the core devs will come up with a solution and all will be well at some stage. Possibly they may use some of the elements in "Collections Manager" addon, maybe it will be completely different. Here we are providing thought and working concepts.
I would say unless there's anything else planned that we could promote this addon to Addons Contrib for wider testing and feedback in nightly builds some time in the near future. with the aim of supplying functionality until it's built in. Not to replace or be a complete solution to the layers issue. Just as a helper for users who might need or make use of some of the functions early.
Thanks

guys, if you can create "the old quick layer visual grid" ... you're riding.
an addon would not bother anyone, and would be very useful to those who manage many models and collections to "catalog quickly"

@Paul Kotelevets (1D_Inc)

Don't know, what about horizontal scrollbar? Is it possible?)

Not to my knowledge; at least I don't think I've ever seen a horizontal scrollbar on a UIList or popup. It would be a good solution, though. Maybe someday.

Check up this proposal, it can be interesting and fresh.

Yes, it's interesting. I think you've stated most of the points here and it seems like a lot of them will fit in nicely.

It works simple - checkbox allows to decline all visibility changes, that was made since window was open.
When M window closes - visibility changes made in M window has gone.
You can find video about LAYWALK command in Layer Maniphest topic post.

Neat post! The situation here is a little more complicated because of the way popups work and because you can add and remove layers, but I think I can come up with something that will satisfy. How about a button to clear visibility changes?
Some of the things in that post are out of the scope of this addon, but I may be able to add some of them into my addon Advanced UI Menus (it's my personal playground for anything that makes blender better/faster UI/Workflow wise)

About M5:
I think I understand, but I'm not sure yet how this can be integrated nicely into the collection manager, so I'll come back to that later after I've implemented some of the other improvements.

Well, you already made an "Expand" button, that technically solves filtering issue - so we are already able to find matching pattern is all scene's collections, and even see it's enclosing level. That's good job!)
I guess you understand how useful it will be in 1000 collection's file. I think, it will allow to survive in such files at some point =)

Nope! Total serendipity! :)
With the expand button I just thought someone might want to be able to look over all the collections without manually expanding stuff. Now that you mention it, I can see how it and filtering is useful in files with 1000s of collections. And speaking of filtering, I'm not sure where I saw this, but if you want to be able to filter on various collection attributes other than the name I think I could find a way to facilitate that.

@noki paike (amonpaike)
That may or may not fit in with this addon, I'll have to see, but I can always add it into Advanced UI Menus or submit it as a separate addon.

@Brendon Murphy (meta-androcto)
@Paul Kotelevets (1D_Inc) has given me a lot of good suggestions for improvement. If it's alright with you I'd like to develop it outside of contrib for a while longer. I feel that I'll have more freedom to make large changes if I don't have to worry about keeping everything really tidy for blender.