Graph Component | Modular Node/Edge Editor


#1

Hey,
I am working on project that needs an interface for modular components that involves connecting nodes and edges. I have looked at the plugin host demo, but needed some more features.
Searching through this forum, there seem to be an interest in such component, so, I am sharing the one I created.

The code of the component and a demo application is available on Github:

https://github.com/hkarim/JUCE-Graph-Component

Here is a screenshot of the demo application:

Some Features

  • Each node can be scaled individually, zoom-in cmd + '+', zoom-out cmd + '-', or zoom to original scale cmd + '0'
  • Multi-select using keyboard or mouse is supported
  • Special type of node that can host any component
  • Backed by a simple graph that supports communication between nodes
  • Sample application to preview the component and how to use it
  • Very simple theming for changing the overall components look and feel

Comments and feedback are most welcome.


#2

This is almost creepy - I’ve been working on this exact same thing the last week or so. Your solution is more complete than mine, so I’ll look into seeing if I can contribute anything to yours and likely migrate everything over to your system - pending one issue…

You seem to have licensed the code as GPL, so unfortunately that reduces its usefulness for a large number of JUCE devs (such as myself) pursuing commercial applications. Any chance of changing the license to a permissive one, such as MIT or BSD?


#3

I just want to comply with Juce license, if MIT or BSD doesn’t violate the original Juce license then I am OK. Does it?


#4

Using an MIT or BSD license for your work shouldn’t cause any issues.


#5

OK. I changed the license to MIT


#6

I have also written a system like this. However, I’ve never figured out how to serialize it, because XML type structure is not well suited to graphs. Do you have a way to encode the data model for this component in a ValueTree?


#7

How about storing all nodes in a list and all connections in another?