Skip to main content

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

FunctionParametersReturnsDescription
BakeSelectedMeshesFRetroBakeSettingsint32Bakes the selected Static Meshes. Returns the count baked.
BakeMeshUStaticMesh*, FRetroBakeSettingsUStaticMesh*Bakes one mesh; returns the created asset.
BakeSelectedLandscapesFRetroBakeSettingsint32Bakes the selected Landscape actors.
ApplyRetroTexturesFRetroTextureSettingsint32Applies retro sampling to the selected textures.
RevertRetroTexturesint32Reverts the selected textures from backup.
ApplyLookPresetURetroLookPreset*voidPushes a preset into MPC_Retro.
ConnectExpressionToWorldPositionOffsetUMaterial*, UMaterialExpression*, int32voidUtility 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.