Bforartists / Manual

The Bforartists Manual
17 stars 6 forks source link

Node Groups gets descriptions now #613

Closed Draise14 closed 2 weeks ago

Draise14 commented 1 month ago

image

Got a new nodegroup field, descriptions!

Details SHA-1: 6176e66636342dabbd78594ecfb188c8a4bc996c * Nodes: add node group description This allows node groups to have a description that is shown in the add menu or when hovering over the node header. This new description is stored in `bNodeTree.description`. Unfortunately, it conflicts a bit with `ID.asset_data.description`. The difference is that the latter only exists for assets. However, it makes sense for node groups to have descriptions even if they are not assets (just like `static` functions in C++ should also be able to have comments). In some cases, node groups are also generated by addons for a specific purpose. Those should still have a description without being reusable to make it easier to understand for users. The solution here is to use the asset description if the node group is an asset, and to use `bNodeTree.description` otherwise. The description is synced automatically when marking or clearing assets. A side benefit of this solution is that appended node group assets can keep their description, which is currently always lost. Pull Request: https://projects.blender.org/blender/blender/pulls/121334