Repository navigation
Add BlueprintEditor (Unreal-style visual scripting) with a UEVR Lua backend - #2
Draft
lobotomy-x wants to merge 5 commits into
Draft
lobotomy-x wants to merge 5 commits into
lobotomy-x wants to merge 5 commits into
Conversation
A self-contained two-file Dear ImGui widget (BlueprintEditor.h/.cpp) that mimics Unreal Engine's Blueprint editor for UObject-style class hierarchies: - UObject-like reflection registry (classes, functions, events, properties, enums) with a fluent builder API and a sample AActor/APawn/ACharacter hierarchy plus kismet-style libraries - Event, function call, property/variable get/set, flow control (Branch, Sequence, loops, Gate, ...), reroute and comment nodes - Exec and data pins with Unreal's type colors and connection rules (single-source data inputs, single-target exec outputs, inheritance-aware object pins, numeric promotions, data cycle rejection) - Interactive canvas: pan/zoom, box select, wire dragging with spawn-and-connect palette drop, searchable context-sensitive add-node menu, alt-click link breaking, double-click reroute insertion, inline default value editors, comment boxes that carry contained nodes - Copy/paste/duplicate via the ImGui clipboard, snapshot-based undo/redo and a line-based text serialization format - Demo window in the example program (View -> Blueprint Editor) building a sample ACharacter blueprint Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011VwW7xyG1zN46RqMvHs8fL
The windows-2025 runner image no longer ships Visual Studio 17 2022, so the
pinned generator fails at configure time ("could not find any instance of
Visual Studio"). Let CMake pick the newest installed Visual Studio instead.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011VwW7xyG1zN46RqMvHs8fL
Turns blueprint graphs into ready-to-run Lua scripts for UEVR (the Unreal
Engine VR injector):
- SetupUEVRRegistry populates the reflection registry with the UEVR Lua API
surface: engine tick / slate / XInput / UI / reset callbacks as events,
uevr.api and uevr.params.vr calls, UObject property and function access
through UEVR's metatable bindings, XINPUT_STATE helpers and Lua-native
math/string/logic utilities
- GenerateScript walks the graph and emits Lua: events become
uevr.sdk.callbacks registrations, exec wires become statements, data wires
become expressions (pure nodes inline, impure results captured in locals),
variables become script-scope locals and flow control maps to native Lua
(if/for/while plus state locals for Do Once / Do N / Flip Flop / Gate)
- Function bindings are data-driven Lua expression templates stored in the
new registry metadata field ({0}..{n} inputs, {target}, '|'-separated
segments for multi-output pure functions), so game-specific APIs can be
added with one fluent line per function
- BlueprintEditor gains const graph accessors (GetNodes/GetLinks/GetNode/
GetPin) and metadata fields on Class/Function for code generator backends
- Example app gains a UEVR Lua Editor demo window (View menu) with a sample
haptics-on-button-press graph and a live syntax highlighted preview of the
generated script in a read-only TextEditor pane
Generated scripts were validated with luac 5.4 -p and executed against a
stubbed uevr API to confirm callbacks, branching, haptics, property writes
and loops behave as modeled.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011VwW7xyG1zN46RqMvHs8fL
MSVC treats strncat as unsafe (C4996) and the example builds with /WX. Use std::string concatenation instead, and leave inf/nan values alone. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011VwW7xyG1zN46RqMvHs8fL
Spread out the math nodes so nothing overlaps and enlarge the comment box to cover the whole health drain group. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011VwW7xyG1zN46RqMvHs8fL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
BlueprintEditor.h/BlueprintEditor.cpp— a self-contained Dear ImGui widget in the same two-file style asTextEditorthat implements an Unreal Engine style Blueprint visual scripting editor for UObject-like class hierarchies — plusBlueprintLua.h/BlueprintLua.cpp, a UEVR Lua scripting backend that turns those graphs into ready-to-run scripts for the UEVR injector.What's included
Reflection model (UObject mirror)
TypeRegistrywith classes, functions, events, properties and enums, built via a fluent API (.In(),.Out(),.Ret(),.Pure(),.Static(),.Keywords(),.Tooltip(),.Metadata())IsChildOf) drives object/class pin compatibilitySetupDefaultRegistry()ships a sampleUObject/AActor/APawn/ACharacter/component hierarchy plus kismet-style math, string, system and gameplay librariesGraph model & rules
Interactive editing
BLUEPRINTwatermarkDel/Home/Ctrl+A/C/X/V/D/Z/YshortcutsSaveToString/LoadFromString) with escaping, used for persistence, clipboard and undoUEVR Lua backend (
BlueprintLua)SetupUEVRRegistrypopulates the registry with the UEVR Lua API surface: engine tick / slate / XInput / UI / reset callbacks as events,uevr.apianduevr.params.vrcalls, UObject property/function access through UEVR's metatable bindings,XINPUT_STATEhelpers and Lua-native math/string/logic utilitiesGenerateScriptemits Lua: events →uevr.sdk.callbacks.on_*registrations, exec wires → statements, data wires → expressions (pure nodes inline, impure results captured in locals), variables → script-scope locals, flow control → nativeif/for/whileplus state locals for Do Once / Do N / Flip Flop / Gate{0}–{n}inputs,{target},|-separated segments for multi-output pure functions) so game-specific APIs are one fluent line eachExample & docs
example/blueprint.cppdemo (View → Blueprint Editor) building a sampleACharacterblueprintexample/uevr.cppdemo (View → UEVR Lua Editor) with a haptics-on-button-press sample graph and a live syntax-highlighted preview of the generated script in a read-onlyTextEditorpanedocs/blueprintEditor.md,docs/blueprintLua.md+ README sectionwindows-2025runner image no longer ships VS 2022, so the Windows workflow now lets CMake auto-detect the installed Visual StudioTesting
-Wall -Wextra -Wpedantic -Werrorunder GCC 13 and Clang 18 against Dear ImGui v1.92.7; the fullexample/CMake build (the same configuration CI runs) succeeds on Linuxluac5.4 -pand executes it against a stubbeduevrAPI, confirming callbacks, branching, haptics, property writes and loops behave as modeled🤖 Generated with Claude Code
https://claude.ai/code/session_011VwW7xyG1zN46RqMvHs8fL