The addon Node Presets
is currently included in version 3.1, but has a small bug concerning geometry nodes. This has been fixed in the source code, but is still present in 3.1.
Basically, this addon offers the possibility to use node groups for the following areas as templates/presets:
- Shader/Texture Nodes
- Compositing Nodes
- Geometry Nodes
For the areas Shader/Texture and Compositing the add also works without problems, but nevertheless all nodes in each area are always listed, no matter whether they are compatible or not.
Only when trying to add, for example, a shader node in compositing, a message is displayed that this does not work.
How can I still use the functionality for Geometry Nodes in version 3.1?
All you need to do is fix the bug mentioned earlier.
You can do this yourself by adding a line of code to the scripts/addons/node_presets.py
file.
Change this code:
node_type_string = {
"ShaderNodeTree": "ShaderNodeGroup",
"CompositorNodeTree": "CompositorNodeGroup",
"TextureNodeTree": "TextureNodeGroup",
}[type(node_tree).__name__]
to this:
node_type_string = {
"ShaderNodeTree": "ShaderNodeGroup",
"CompositorNodeTree": "CompositorNodeGroup",
"TextureNodeTree": "TextureNodeGroup",
"GeometryNodeTree": "GeometryNodeGroup",
}[type(node_tree).__name__]
How can I separate the areas for Shader/Texture, Compositing and Geometry?
For this the addon would have to be extended a bit.
Unfortunately, when starting Blender and reading the blend files located in the specified folder, it is not possible to distinguish what type the node groups are. That's why all found nodes are always displayed in all areas.
This is due to another problem and unfortunately cannot be changed at the moment. More about this here.
However, there is a way to get the desired functionality anyway, by simply implementing multiple paths. One for each area.
So you can store your Shader Nodes and Geometry Nodes in their own files and folder. That's a few more paths, but it works well.
The necessary changes are the input fields for the paths to your Blend files, the reading of these paths when Blender is started, and the provision of the node groups found in the files in the respective areas.
So you don't have to tinker with these changes yourself, I've done that for you and made the modified add-on available on Github.
Here you can download the ZIP directly: NodePresetsExtended.
After that you just need to install the addon as usual (but first deactivate the old add-on Node Presets
if it is activated!), specify the paths to your files, restart Blender and your Geometry Node Presets will work as you want them to.
Note:
If you store your node groups in a blend file, it is helpful if you store them all in a single root node and name this node e.g. _OVERVIEW
.
All node groups whose names start with an underscore are not included by the addon, and you keep a better overview of the included node groups in your files.