Outliner
I would then use the same logic F1 = course > F4 = detailed
F1: Bounds
F2: Wire
F4: Textured
——
By the way, it won’t change modes if I select the collection, hit the hotkey and decided I want to change modes.
By default Blender uses toggles for Wireframe/ solid, so I think I’ve gotten used to those. Both F1 and F2 would be toggles in my config between Bounds/ Textured and Wire/ Textured.
The only thing I would expect is that if I hit the F11/ F12 toggle is that all objects would go to the same mode.
For the rest, I only have to manually place the keymaps for the shortcuts, so you don’t really need to worry about that.
Conclusion
So I think, contrary to what I first said before I tested it, that because I toggle the state with a hotkey, I expect the button to determine the state of all the objects/ collections. Sorry for the confusing initial response.
And it would be most consistent the way Blender does visibility toggles (the F2,3,4 story).
So in this one, you can see the collections change both directions, which is not what I would expect.
You can see it happen here too (now with pop-up panel to see what I am doing).
By the way, when using toggles, the redo last panel won’t make sense, change it back to the other mode and it will not switch to the other mode, because it is a toggle. So I would suggest not using the redo last for the toggles.
E: Overall, I really like the experience! Just a matter of making sure the toggles work consistently.
Wire toggle
If selection/ collection contains non-wire, switch those objects/ collections to wire.
Else, switch to Textured.
Bounds toggle
If selection/ collection contains non-bounds, switch those objects/ collections to bounds.
Else, switch to Textured.
E2: Decided to move the toggles to number keys, 1 & 2 toggle object bounds and wire respectively, 3 & 4 toggle collection bounds and wire respectively. This solves the F2 conflict as well.
for keymaps in outliner: object.collection_wire_toggle - switch all objects in collections by active to wire/textured object.collection_bounds_toggle - the same but to bounds/textured
if it’s ok, then another 2 operators for only selections
Note!
the same object.collection_wire_toggle and object.collection_bounds_toggle need to add to 3D View keymap, if you want to work it in 3dView also.
Can you select one of the items within the collection first before performing the display mode changes? And maybe deselect when done? Perhaps by reading the collection name from the current selection?
E: for nested collections that may prove more difficult.
If not, then so be it
I already like it as is, especially with object + collection support
I can get collections name but I can’t make them active and highlighted in outliner (when I select all collection objects switch them and after I need to select collections again for toggle), also I need to check if it only objects selected or only collections.
Maybe someone with a more skills will help me in the future.
But for now only objects can toggle.
No problem, I like it!
Thank you for your effort on this!
Since it depends on the active object there can be occasions where If I select objects, they do not toggle, but don’t feel obliged to fix this, I can easily get around this.
But Note! Active will be considered an object with active origin, even if it not highlighted.
And it will become highlighted when using the toggle operator.
Could you make an collapse/ expand selected collections operator? Machin3tools has collapse/ expand all folders, but I am still missing a more finer grained control. If possible, it would fit your addon nicely, I think.