Exporting multiple nodes is now supported. Right click on a node in the data subject hierarchy, and you should see “Export as…” show up if the clicked node can be exported, or if it has at least one descendant in the hierarchy that can be exported.
A format and options selector will show up for each node type. So, for example, if all the nodes under a folder have the same type, then there would only be one format and options selector.
As is visible in the screenshot, filename entry is disabled when exporting more than one node. Node name is used automatically.
When it is relevant, a checkbox will show up to let you choose whether or not to include children of the selected item. Another checkbox can also show up to let you choose whether to include children recursively (i.e. include all descendants in the subject hierarchy).
Thanks to @jcfr, @lassoan, and @pieper for their feedback and support throughout this work!
Exporting multiple nodes is not exposed through the nice slicer.util module, but you could always see how qSlicerCoreIOManager::exportNodes is accessed internally in slicer.util.exportNode and follow that as a guide:
The script repository also shows a python implementation of a similar functionality using single node export: