The “I don’t know why it’s working” was about the new panel search, and I falsely thought that it somehow overrides the poll()
method but it doesn’t. So, everything is clear now for me
Regarding the “Blender-dependency”: In my opinion it’s not a big problem in this case as the tab bar layout is probably changed once every 10 years or so, even then it will probably continue to work as we would wrap the original drawing function in our drawing function (Python makes this pretty easy). Basically we just append something in front of the original code. There are a lot of other things that break more often.
But the flaw that I found yesterday is a huge problem unless we decide that it doesn’t matter if the Blender/Armory switch has the same value in all windows (so you see the same panel)… In theory you could dynamically create a tab bar for every properties editor with it’s own enum property but that would be the ugliest workaround the world has ever seen^^ So unless we find a better solution I guess we need to keep the current way. Does anybody have an idea maybe?
Speaking of a better solution:
That would certainly be the cleanest and best way, but unfortunately it is not possible with the Python API (you would have to change the Blender source code and provide custom builds), that’s why I was looking for a way to create a new properties tab. Blender’s Python API is very restricted unfortunately even if it’s huge. On the other hand, that is what makes you creative because you always need to find workarounds. The reason why Armory has a custom node editor is just because of the fortunate circumstance that Blender creates an editor for every node tree type.
Slightly redesigned trait panel, what do you think?
Improved player panel: