Skip to content

MMKPC/ue5-python-pipeline

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UE5 Python Asset Pipeline

Production-grade Python toolset for Unreal Engine 5 asset management, batch operations, and CI/CD integration.

Tests UE5 Python


What It Does

Five pipeline operations, all driven from Python using the official unreal module:

Command What it does
audit Scan for naming convention violations + missing LODs
rename Batch prefix/suffix/strip across any asset class
lod Apply LOD screen-size profiles to all Static Meshes
report Export a full JSON asset manifest for pipeline handoff
validate CI gate — exit 1 if any violation found

Usage

Inside the UE5 Editor Python Console

import pipeline.ue5_pipeline as pipe

# Audit entire project
pipe.audit_assets("/Game")

# Batch rename — preview first
pipe.batch_rename("/Game/Weapons", prefix="WPN_", dry_run=True)

# Batch rename — live
pipe.batch_rename("/Game/Weapons", prefix="WPN_", dry_run=False)

# Apply 4-LOD profile to all Static Meshes
pipe.generate_lod_settings("/Game/Environment", num_lods=4, dry_run=False)

# Export JSON manifest
pipe.export_asset_report("/Game", output_path="D:/reports/asset_report.json")

From BuildGraph / Horde / Jenkins (commandlet)

"UnrealEditor-Cmd.exe" MyProject.uproject \
    -run=pythonscript -script="pipeline/cli.py" \
    -params="audit /Game/Characters"

"UnrealEditor-Cmd.exe" MyProject.uproject \
    -run=pythonscript -script="pipeline/cli.py" \
    -params="validate /Game --fail-on-missing-lod"

Use validate as a pre-submit gate: exit code 0 = clean, exit code 1 = violations found. Drop it into any CI step.

# Example BuildGraph node
<Node Name="Asset Validation" Requires="Compile">
    <Command Name="pythonscript" Arguments="-script=pipeline/cli.py -params='validate /Game'"/>
</Node>

Naming Convention Rules

Asset Class Required Prefix
StaticMesh SM_
SkeletalMesh SK_
Texture2D T_
Material M_
MaterialInstance MI_
Blueprint BP_
AnimSequence A_
AnimBlueprint ABP_
SoundWave S_
SoundCue SC_
NiagaraSystem NS_

Rules are defined in NAMING_RULES in ue5_pipeline.py — extend as needed for your studio.


Installation

  1. Copy the pipeline/ folder into your UE5 project's Content/Python/ directory
  2. Enable the Python Editor Script Plugin in your project
  3. Restart the editor
MyProject/
└── Content/
    └── Python/
        └── pipeline/
            ├── __init__.py
            ├── ue5_pipeline.py
            └── cli.py

Offline Tests

Tests mock the unreal module — run without a UE5 editor:

pip install pytest
pytest tests/ -v
8 passed in 0.07s

Architecture

pipeline/
├── ue5_pipeline.py   # Core: audit, rename, LOD, report, validate
├── cli.py            # argparse CLI wrapper for commandlet/CI use
└── __init__.py

tests/
└── test_pipeline_offline.py   # Full suite, no UE5 required

All operations go through unreal.AssetRegistryHelpers and unreal.EditorAssetLibrary — the same APIs used in Epic's own tooling. No third-party dependencies.


Integration Points

  • Horde / BuildGraphvalidate command as pre-submit gate
  • ShotGrid / Ftrackreport exports JSON for ticket creation automation
  • Perforce — pair with P4 triggers for pre-commit asset validation
  • GitHub Actions — run audit on uasset changes via commandlet step

Related Tools

  • ue5-asset-validator — Slate UI plugin for the same validation logic with in-editor remediation
  • ue5-horde-pipeline — BuildGraph CI/CD pipeline where this drops in as a validation node

MMKPC Studios | mmkpcstudios.com

About

UE5 Python pipeline toolkit - asset validation, batch processing, editor automation for Unreal Engine 5. By Matthew Mitchell / MMKPC Studios.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages