Skip to content

feat: add batch Blueprint-to-C++ commandlet#14

Closed
ethanfischer wants to merge 2 commits intoprotospatial:mainfrom
ethanfischer:feat/batch-commandlet
Closed

feat: add batch Blueprint-to-C++ commandlet#14
ethanfischer wants to merge 2 commits intoprotospatial:mainfrom
ethanfischer:feat/batch-commandlet

Conversation

@ethanfischer
Copy link

Summary

  • Add UN2CBatchBlueprintCommandlet for batch-converting Blueprints to C++ from the command line
  • Export core classes (FN2CNodeTranslator, FN2CNodeCollector, FN2CSerializer) with NODETOCODE_API for external module usage
  • Fix ProcessN2CJson to invoke OnComplete callback in all code paths
  • Add AssetRegistry module dependency

Batch Commandlet Features

Enables automated Blueprint-to-C++ conversion without requiring the editor UI:

UnrealEditor-Cmd.exe Project.uproject -run=N2CBatchBlueprint [options]

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_KEY env var or NodeToCode secrets file

Output:

  • Saved/NodeToCode/Translations/<BlueprintName>/<GraphName>.txt

Technical 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

  • Build plugin with UE 5.4
  • Run commandlet with -DryRun to verify Blueprint discovery
  • Run full conversion on a test Blueprint
  • Verify output files are created correctly

🤖 Generated with Claude Code

flashpoint493 and others added 2 commits January 12, 2026 18:17
…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>
@NCMcClure
Copy link
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.

@NCMcClure NCMcClure closed this Feb 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants