C++20 Framework

Advanced Node Editor

A modern and robust framework to create interactive graphical node editors with hierarchical subgraph support, real-time evaluation, and an intuitive user interface.

LanguageC++20
Version1.0.0
LicenseMIT
DependenciesCMake, ImGui

Overview

Advanced Node Editor is a complete solution designed for developers who want to integrate node-based visual systems into their applications. Ideal for game engines, content creation tools, or automation software.

Example of a small game engine made with the node editor

Key Features

Full Management

Create, delete, select, and manipulate nodes.

Validated Connections

Connection system between nodes with type validation.

Subgraphs

Full support for nested graph structures.

Real-Time Evaluation

Dependency-ordered evaluation system.

Modern Interface

Interactive view with zoom, pan, and auto-centering.

Intuitive API

A clear interface for seamless and fast integration.

Installation and Quick Start

Requirements

Make sure you have a C++20 compatible compiler (GCC 10+, Clang 10+, MSVC 2019+) and CMake 3.16+.

Build

mkdir build
cd build
cmake ..
make -j$(nproc)

Initialization Example

#include "NodeEditorAPI.h"
using namespace NodeEditorCore;

// Basic initialization
NodeEditorAPI editor;
editor.initialize();
editor.setWindowSize(1280, 720);

// Define a node type
NodeEditorAPI::NodeDefinition mathNode;
mathNode.type = "math_add";
mathNode.name = "Addition";
mathNode.category = "Math";
mathNode.inputs = {{"A", PinType::Float}, {"B", PinType::Float}};
mathNode.outputs = {{"Result", PinType::Float}};
editor.registerNodeType(mathNode);

// Create and connect
UUID nodeA = editor.createNode("math_add", "Addition 1", Vec2(100, 100));
UUID nodeB = editor.createNode("math_add", "Addition 2", Vec2(300, 100));
UUID connection = editor.connectNodes(nodeA, "Result", nodeB, "A");

API and Customization

The framework is designed to be fully extensible. You can register custom evaluators, create complex node types, and even implement your own rendering.

Evaluator Example

editor.registerEvaluator("math_add", [](const std::vector& inputs) -> std::any {
    if (inputs.size() >= 2) {
        try {
            float a = std::any_cast(inputs[0]);
            float b = std::any_cast(inputs[1]);
            return a + b;
        } catch (const std::bad_any_cast&) {
            return 0.0f;
        }
    }
    return 0.0f;
});

MIT License

This project is distributed under the MIT license, offering great freedom for personal and commercial use.

                    Copyright (c) 2025 Theo Baudoin

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.