bWidgets
Core widget toolkit designed for Blender
|
Details on why Blender should use bWidgets rather than an existing widget/GUI toolkit.
Why would Blender use and even develop bWidgets instead of an existing Widget/ GUI toolkit? There are multiple things to consider here.
TL;DR: Switching to an existing toolkit is a massive effort with rather high risks and unclear benefits. A custom solution made specifically for our needs is a much safer bet.
Oh yes, depending on the toolkit, the effort might be massive. Even for the most basic features (like widget drawing, handling and layout-management), it would be a huge project. With most toolkits we probably wouldn't be able to do a progressive (step by step) transition, it's all or nothing. So only at the very end, we'd see if our efforts were worth it.
On the other hand, creating our own toolkit - bWidgets - is a huge project too. But in this case, we can develop it progressively and specifically for Blender. There's much less risk of failure.
We all know it: Blender is special. It follows a very uncommon set of UI Paradigms, and we don't want to give up on them.
External toolkits are based on different paradigms and are designed specifically for these. We had to make quite some customizations to any toolkit's default behavior.
Imagine, we go through the major hassle of making Blender use an existing widget toolkit and we gain nothing from it. It may happen that our customizations to the toolkit may end up costing more time to maintain than a custom solution would. Or say development of the toolkit is stopped.
It's barely possible to estimate all requirements we'd have for a toolkit. And thus it may happen that after months of work, we notice a major issue with the it. Even for the requirements we can figure out now, somebody who really knows the toolkit would have to judge if it can meet them.
Add to this the factor that we have very limited plan on where to take the Blender UI in the next years. We don't know yet what future requirements may come up.
With big projects such as switching to an existing GUI toolkit, there's also always that risk of developers who drive the effort loosing their interest. With a more gradual transition, we can merge the changes in more gradually too.
We would give away great control over how issues are handled and how priorities are set. Now, we'd rely on release schedules of these projects for some of our UI changes. What if the toolkit decides to switch to a newer version of the C/C++ standard - one that we can't support yet?
Again, keeping this freedom is not for free either.
There are many existing Widget Toolkits. Each have their own pros and cons, there is no magic bullet for Blender. Let's look at some of their cons to see if they are an option at all.
Of course bWidgets will have its own issues, just like any other solution would. And it still has a long way to go before Blender can make good use of it. Nevertheless, having full control over it, we can set our own priorities. No third parity projects involved that decide on our behalf which bugs need urgent fixing and which don't. We can stick to the dependencies Blender already has and don't need to customize the behavior to fit our paradigms. Instead we just make the toolkit be based on our paradigms. We can make themes and the Python layout scripts compatible so there's no need to recreate them. And we can make a careful transition, step by step.
bWidgets intends to strictly isolate the widget code so that it can be replaced much easier in future. And since its design is more conventional, a switch to an existing toolkit would be much easier by then too - even if just for testing purposes.
That said, if bWidgets works out the way it's planned, it should be a superior option to any existing toolkit, simply because it's made specifically for Blender. Making a big portion of our UI code ready for the next decade.