Replies: 2 comments 2 replies
-
Code design pattern is an interesting topic for sure. I am no friend of long defines lists. I am more a friend to implement the functionality where it is used. If technical possible of course :) I am already unhappy how the header icons in the nodes are implemented, by the long case list. But i am also pragmatic. It works, and i don't know of a better way, so i leave it alone. But imho such external dependencies are not good. I prefer another design pattern. I just know the german word for it. It's called Selbstverwaltender Code. Google translates it with self-managing code. I think that's the OOP programming approach. Everything required should be available where it is required, and not cluttered across several external classes and files. When we have a property with an icon, then the icon should be defined in the property. And not in a long list elsewhere. That's for the add menu for example. We should add the icons directly in the operator property if possible. Saves also lots of searching. In the end everything working is allowed. As told, i am highly pragmatic in this regards. I am green with everything that works. |
Beta Was this translation helpful? Give feedback.
-
For the record this idea finally became true with #2308 |
Beta Was this translation helpful? Give feedback.
-
Right now we have node icons in many places:
1 - Node shelf
2 - Node headers
and soon node add menu
we should find a way so that we define icons once and it is referenced in all of them, or at least twice, one in Python, and once in C
also for the toolshelf we should try to automate some pieces of code because right now the code is very duplicated, there should be some sort of auto generation
this is a discussion for near future
Beta Was this translation helpful? Give feedback.
All reactions