First off, let me say that this add-on is super handy and has already saved me time on a number of occasions in the couple days since purchasing it.
However I’ve run into some problems (maybe bugs?) when using it with animation nodes (AN).
First off is that if you save a preset and load it without first deleting the original nodes, or if you load the same preset multiple times, AN gives an error because more than one node shares the same identifier. I can work around this by replacing the loaded nodes with copies via the N panel, but is there any chance this could be solved by giving the loaded nodes unique identifiers (like what seems to happen when loading shader node presets)?
The other issue is that I can’t seem to load presets containing nested subprograms without getting an error. For example if you create a loop subprogram and then invoke that loop inside of a group subprogram, I can save these as a preset just fine but I’ll get an error when loading the preset. While I can work around the prior issue, I don’t see a good way to get around this one for the time being. Hopefully you can take a look at this when you get a chance.
Hi, here’s a blend file with a very basic example of the first issue. I added a single node (integer input) and saved it as a preset. Then loaded the preset. If you look in the N panel it should describe the error. NodeKit Error Example.blend (818.6 KB)
The fact that you can’t reproduce the first issue makes me suspect that it’s some problem on my end caused by using this fork of AN, or maybe the specific version (I’m on version 2.1.7 and latest is 2.2). I will try install the regular version of AN and see whether the problem still persists.
Thanks very much for looking into this for me!
Update: Still getting the first issue with vanilla animation nodes (tried with both LTS (2.1.8) and latest (2.2.1) versions of AN, Blender 2.90)
I think the error is still occurring in that video because there are red bars at the top and bottom of the window. If you open the ‘Node Tree’ tab in the N panel, then open the ‘Problems’ section, you’ll see an error there.
I should clarify: for the first issue I can successfully load the preset, and the nodes will appear. However because of the shared identifiers problem, the node tree will not execute. So the problem isn’t that I can’t load the preset - it’s that animation nodes will not run if there are multiple nodes sharing identifiers.
Got it, I see the warning message in the Problem section of Node Tree tab. Let’s me try to fix it, I know this is a real issue that will cause your work flow with Animation Node.
I think after a long day of coding, these two issues have been fixed, I will make a new release hours later.
I just got excited to fix the second issue, because it’s so hard to fix, I used a timer to delay the connection of sockets, and it works fine. WOW, coding is so fun.
That’s great to hear! Finding the solution to a problem can be so satisfying. Can’t wait to test it out
In my experience script nodes do work, however when loading up a preset in a new blend file you’ll need to manually click the plus button on the script node to link the python script.
Yeah, as aqua said, AN script node works fine with Node Kit, and if you restore preset into a new blend file, you need to manually link the script text to the script node, because the new blend file does not contain the text script which was not saved into the preset.
I see. Would not it make sense to actually parse the script and save it in the template? I am very much interested in this add-on but the AN scripts are part of my workflow. I do not gain a lot as long as I need to open the original file and copy bunch of scripts manually and set them in the right script nodes, appending the node tree would get me there faster obviously this is not as slick. Imagine needing to this with 10 script nodes in an AN tree. However if this is a feature you might consider implementing at some point I would be happy to give it a go.
Brilliant! As far as I can tell, those two issues are gone!
Unfortunately I did stumble upon another scenario that causes an error (sorry to do this again!).
I’ve narrowed it down to subprograms (groups or loops) that have these types as inputs or outputs: float list, boolean list, text list. There may be other types that cause this error, I don’t know yet. Saving and loading gives a visible error similar to the second issue from before.
I also tried with expression and script nodes using these socket types. Bizarrely when loading them there is no error but any inputs/outputs using those types simply disappear.