November Sprint - Final(ly!)
Rewire - the add-on that almost never was!
Just like my other add-on this was something for me to make a Blender task easier. I'm a bit OCD about my node trees.😁 I don't mind the clutter while I'm working on it but sooner or later I have to clean things up and make it tidy. This is something I do when done with a shader or do them all at once at the end. I know you know what I mean. All those wires that run from one side of the screen to other, behind and through all the nodes. Cleaning all that up takes time.
I searched the web for an add-on that would do what I wanted, I mean, why re-invent the wheel?🛞 But to my surprise I found nothing that would do what I wanted. My idea was simple. I just wanted to be able to draw my wires like I was drawing lines on paper.✏️〰️ Not using Blenders native features of adding reroutes and then moving them or dragging out a wire and having to select reroute from a menu. Just a little thought here and you know that's a lot of clicks and moving.🖱️
Time to put on the coder's cap and figure out how to make my own.🎓 As I said, click, drag, drop. You have a wire with a reroute at the end. OH, if it were only that easy! I thought surely a day or two. I actually felt a little embarrassed making this a Sprint Goal. But in the end, it has taken almost the full three weeks. I now know more about the internal workings of Blender than I ever wanted to and I finally understood why this "simple add-on" didn't exist already. Some might say it is more trouble than it's worth. But in the end I already love it!❤️
As I said this nearly failed. I could not get it to work. So now is the time for a HUGE shout out to NodePie and its author Andrew Stevenson.💯🙏 Just as I was about to give up I remembered something NodePie did.💡 It had nothing to do with drawing wires but the mechanics were similar. After examining NodePies code and deciphering it, everything fell into place. I saw the proverbial light at the end of the tunnel if I could adapt some of NodePies code to my own. You have to absolutely love open source. I can only hope some day someone will reuse something I have written and shared with the world.
So what is it? And how does it work? ReWire is not flashy. It does one thing and one thing only. It draws a wire. You can draw from socket to socket, socket to/and drop a reroute, reroute to/and drop a reroute, and reroute to a socket. You just save a ton of clicks. That's it. Below is a little demo of it in action. Disregard the nodes themselves, they make no sense. Also I wasn't trying to be very neat. All I wanted to do was get the wires from running behind other nodes.
If you read this far I thank you.🙏 I'll give a few more notes on the add-on and post it below. Feel free to try it out and use it if you find it useful.
1. Install with Blenders "Install for disk..." feature.
2. N-panel Button or hotkey Alt+W to turn on/off ReWire mode.
3. Alt+LMB to draw the wires. You only have to hold Alt to start the drag then it can be released.
4. Undo steps are created for each segment.
5. Most normal Blender functions work while ReWire is active. If you find something not working, simply turn ReWire off.
6. Works in all Node Editors.
7. Being able to go from reroute or output socket to another node input socket was included in case you get into a pattern of using Alt+LMB but it's not necessary in ReWire mode. You can still use Blenders normal LMB-drag to connect those.
That's about it. I hope you can find it useful. And thanks again if you read all of this. I know I find reading the story of the process behind what others post here as enjoyable as seeing the final product.😀
If you do try it and find anything a miss, please let me know.
NodeReWire_v1_7_3.zip