blender/scripts
Jacques Lucke 6176e66636 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
2024-05-08 11:25:00 +02:00
..
freestyle Cleanup: unused imports 2024-04-19 16:09:30 +10:00
modules Cleanup: remove debug print 2024-05-03 23:23:35 +10:00
presets Cleanup: Make format 2024-05-02 08:52:07 -04:00
site Cleanup: spelling in comments, update dictionary 2023-09-03 21:35:07 +10:00
startup Nodes: add node group description 2024-05-08 11:25:00 +02:00
templates_osl License headers: remove GPL header from OSL template script 2023-08-04 13:24:15 +10:00
templates_py Python: replace '%' with str.format for examples & templates 2024-04-12 15:33:40 +10:00