The main way to create a new node group right now is to select some nodes and
then press ctrl+G. This works well for the common case when one already has some
nodes to group. However, there is no good alternative currently for when one
wants to create a new group from scratch. A common workaround currently is to
add some dummy node, then press ctrl+G and then to delete the dummy node in the
group again. Obviously, we can do better than that.
This patch adds a `New Group` entry in the menu. It's available in geometry,
compositing and shading Nodes. The operator adds a new node group called
"NodeGroup" (the same default name we use for ctrl+G currently). Then it adds a
new group node and assigns the new group to it. The group itself does not have
any inputs or outputs by default because any such socket would just be a guess
that's likely wrong and more annoying than useful.
A nice side benefit of adding this operator is that the Group menu is not empty
in shading and compositing nodes initially which always looked a bit off.
Pull Request: https://projects.blender.org/blender/blender/pulls/138430