Blueprint / Python API
The whole pipeline is scriptable through URetroRenderLibrary, a Blueprint Function Library. Every function is CallInEditor, so you can drive it from an Editor Utility Widget, a Blueprint, or Python.
Functions
| Function | Parameters | Returns | Description |
|---|---|---|---|
BakeSelectedMeshes | FRetroBakeSettings | int32 | Bakes the selected Static Meshes. Returns the count baked. |
BakeMesh | UStaticMesh*, FRetroBakeSettings | UStaticMesh* | Bakes one mesh; returns the created asset. |
BakeSelectedLandscapes | FRetroBakeSettings | int32 | Bakes the selected Landscape actors. |
ApplyRetroTextures | FRetroTextureSettings | int32 | Applies retro sampling to the selected textures. |
RevertRetroTextures | — | int32 | Reverts the selected textures from backup. |
ApplyLookPreset | URetroLookPreset* | void | Pushes a preset into MPC_Retro. |
ConnectExpressionToWorldPositionOffset | UMaterial*, UMaterialExpression*, int32 | void | Utility to wire an expression to a material's WPO input (used by content-generation scripts). |
Python example
import unreal
# Bake the selected meshes to ~15% of their triangles.
settings = unreal.RetroBakeSettings()
settings.set_editor_property("mode", unreal.RetroReduceMode.PERCENT)
settings.set_editor_property("percent_triangles", 0.15)
settings.set_editor_property("overwrite_existing", True)
count = unreal.RetroRenderLibrary.bake_selected_meshes(settings)
unreal.log(f"Baked {count} mesh(es)")
# Apply retro sampling to the selected textures.
tex = unreal.RetroTextureSettings()
tex.set_editor_property("point_sampling", True)
tex.set_editor_property("disable_mips", True)
tex.set_editor_property("max_texture_size", 128)
unreal.RetroRenderLibrary.apply_retro_textures(tex)
# Apply a look preset.
preset = unreal.load_asset("/RetroRender/Presets/DA_Preset_PS1")
unreal.RetroRenderLibrary.apply_look_preset(preset)
Python property names
Unreal exposes struct fields in snake_case and drops the b prefix on booleans — e.g. bOverwriteExisting becomes overwrite_existing, bPointSampling becomes point_sampling.