Converting node groups to Python addon

I’ve got a .blend file with some node groups that I want to import into a Python addon so it can be installed through the addons rather than appending. I know it’s probably easier to just append, but I’m hoping to distribute a shader plugin and I personally prefer to install things through addons. I’ve got a lot of experience with Python and a little bit with the Blender API. I’m having a really hard time trying to figure out how to do this or finding good resources to learn this. If anyone could even point me in the direction of a tutorial or something I could follow that would be fantastic.

Or even if there’s other addons like this that I could reference. That’s mainly how I got most of my API experience, so I’m fairly comfortable with that.

You can check my github… It has an addon that does exactly what you describe, but it turns nodegroups into custom nodes.

I’ve started to rewriting it since we now have support for custom compositor nodes, as Eevee and Cycles nodes; There’re still some issues to be solved, thought I haven’t had too much time to devote to this, but it’s still in my todo list for this task.

2 Likes

Can you say how to install this add-on? I installed the zip file and tried, blender says that the module has been installed, but I find no check box to tick the add-on

Did you try rename ShaderNodesExtra2.80-master folder to ShaderNodesExtra2.80 before installing?

I was also trying to install it and get the following error when I try to tick the checkbox:
ModuleNotFoundError: No module named ‘ShaderNodesExtra2’ found
addons_utils.py, line 351

Tried it on 2.8 - 2.93
Any info on how to fix this would be greatly appreciated!