feat: add batch Blueprint-to-C++ commandlet#14
Closed
ethanfischer wants to merge 2 commits intoprotospatial:mainfrom
Closed
feat: add batch Blueprint-to-C++ commandlet#14ethanfischer wants to merge 2 commits intoprotospatial:mainfrom
ethanfischer wants to merge 2 commits intoprotospatial:mainfrom
Conversation
…support Add Translate Entire Blueprint toolbar command for batch translation Add full support for Blueprint-level variables, local variables, and component overrides Add ClassItSelf graph type for class structure generation Improve Map key type extraction from Blueprint pin types Enhance component parent-child relationship detection Expand CodeGen_CPP.md with detailed guidance Update README with new features and improvements Fix compilation error: remove incorrect return statement in SaveGraphFilesOriginal
Add UN2CBatchBlueprintCommandlet for batch-converting Blueprints to C++ without requiring the editor UI. Features: - Discover Blueprints via Asset Registry with path filtering - Include/exclude specific Blueprints by name - Optional filtering for Widget and Animation Blueprints - Dry run mode to preview what would be converted - Cross-platform curl subprocess for LLM API calls (workaround for commandlet SSL/HTTP issues) - Support for ANTHROPIC_API_KEY env var or NodeToCode secrets file Usage: UnrealEditor-Cmd.exe Project.uproject -run=N2CBatchBlueprint [options] Options: -DryRun List Blueprints without converting -Path=/Game/... Root path to search -Include=BP1,BP2 Only convert these Blueprints -Exclude=BP1,BP2 Skip these Blueprints -ExcludeWidgets Skip Widget Blueprints -ExcludeAnimBP Skip Animation Blueprints Additional changes: - Export core classes with NODETOCODE_API for external module usage (FN2CNodeTranslator, FN2CNodeCollector, FN2CSerializer) - Fix ProcessN2CJson to invoke OnComplete callback in all code paths - Add AssetRegistry module dependency Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Contributor
|
Hey there! Thanks for putting in the effort to make this. Although I've already had this feature in the dev-2.0 branch, so I'd recommend giving that a try 😀 I'll be trying to polish up v2 here soon and then merging. No timelines though at the moment since work and life has been taking up most of my time. |
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
UN2CBatchBlueprintCommandletfor batch-converting Blueprints to C++ from the command lineFN2CNodeTranslator,FN2CNodeCollector,FN2CSerializer) withNODETOCODE_APIfor external module usageProcessN2CJsonto invokeOnCompletecallback in all code pathsAssetRegistrymodule dependencyBatch Commandlet Features
Enables automated Blueprint-to-C++ conversion without requiring the editor UI:
Options:
-DryRun- List Blueprints without converting-Path=/Game/...- Root path to search (default: /Game/)-Include=BP1,BP2- Only convert these Blueprints-Exclude=BP1,BP2- Skip these Blueprints-ExcludeWidgets- Skip Widget Blueprints (WBP_* or UserWidget parents)-ExcludeAnimBP- Skip Animation Blueprints (ABP_* or AnimInstance parents)Environment:
ANTHROPIC_API_KEYenv var or NodeToCode secrets fileOutput:
Saved/NodeToCode/Translations/<BlueprintName>/<GraphName>.txtTechnical Notes
Uses curl subprocess for LLM API calls as a workaround for SSL/HTTP issues in commandlet mode (Unreal's HTTP module has issues outside the main editor process).
Test plan
-DryRunto verify Blueprint discovery🤖 Generated with Claude Code