Better Python support for the Outliner
Many basic features of the outliner (for example: opening/collapsing collections) are not available or not straightforward to use from an Add-On. Over the years there were many requests to finally address these issues but in 4.0 beta there is still no progress.
For example: clicking on the "Exclude from View" checkbox in the outliner shows the following python command: bpy.data.scenes["Scene"].(null) = False
It literally just waits for a programmer to replace "null" with a switchable key.
Unfortunately collapsing/opening collections have no such half developed entries. It strictly relies on mouse position which makes it impossible (reliably) to use it from a script. (Especially if you want to collapse named collections).
I have seen an Outliner refactoring project in the Blender development which ended August 2023 but seemingly this also not dealt with these problems.
When will this issue gets resolved? Or is this not important enough to spend time on it?
2 Comments
The refractor in August was a GSOC project, and the goal was to make the outline capable of being improved in various ways.
In other words, the goal was to recreate the foundation. Not rebuild the house. But hopefully, that work will be used in the future to improve the outliner as it is needed.
Prior to the GSOC project though, the outliner had nearly no support in the API either, so there's no evidence that it would ever be given API parity with other features unless we let them know how important it is to us.