Skip to content

Use Blueprint functions

Automate pivot baking from Editor Utility Blueprints or Python tools. Pivot Tool exposes two Blueprint-callable functions for batch mesh processing.

Available functions

Bake Mesh Pivot

UPivotToolBlueprintLibrary::BakeMeshPivot(
    UStaticMesh* StaticMesh,
    EPivotPreset PivotPreset,
    FRotator Rotation,
    FVector Scale,
    bool bBakeSocketScale
)

Moves the mesh pivot to a bounding-box preset position and can also bake rotation and scale into the mesh vertices.

Parameter Type Default Description
StaticMesh UStaticMesh* The mesh asset to modify
PivotPreset EPivotPreset BoundingBoxCenterBottom Target bounding-box position (see presets)
Rotation FRotator (0, 0, 0) Rotation to bake into the vertices
Scale FVector (1, 1, 1) Scale to bake into the vertices
bBakeSocketScale bool false Rescales socket positions to stay at the same relative location on the mesh after scale is baked. No effect when Scale is (1, 1, 1)

Note

bBakeSocketScale only has an effect when Scale differs from (1, 1, 1).

Example: move pivot to bottom center

In an Editor Utility Blueprint, call Bake Mesh Pivot with the mesh reference, CenterBottom preset, zero rotation, and unit scale. The mesh origin moves to the bottom center of its bounding box.

Bake Mesh Pivot Relative

UPivotToolBlueprintLibrary::BakeMeshPivotRelative(
    UStaticMesh* StaticMesh,
    FVector PivotLocation,
    FRotator PivotRotation,
    FVector Scale,
    bool bBakeLocation,
    bool bBakeRotation,
    bool bBakeScale,
    bool bBakeSocketScale
)

Moves the mesh pivot by an arbitrary offset instead of a preset position. Leave PivotRotation at zero and Scale at one when you only need a location-based pivot bake.

Parameter Type Default Description
StaticMesh UStaticMesh* The mesh asset to modify
PivotLocation FVector (0, 0, 0) Offset to apply to the pivot position
PivotRotation FRotator (0, 0, 0) Rotation to bake into vertices
Scale FVector (1, 1, 1) Scale to bake into vertices
bBakeLocation bool true Boolean input exposed by the function signature
bBakeRotation bool false Boolean input exposed by the function signature
bBakeScale bool false Boolean input exposed by the function signature
bBakeSocketScale bool false Rescales socket positions to stay at the same relative location on the mesh after scale is baked. No effect when bBakeScale is false or Scale is (1, 1, 1)

Note

bBakeSocketScale only has an effect when bBakeScale is true and Scale differs from (1, 1, 1).

Example: shift pivot 50 units down

Call Bake Mesh Pivot Relative with PivotLocation = (0, 0, -50). Leave rotation at zero and scale at one when you only want to move the pivot.

Asset-level changes

Both functions modify the static mesh asset on disk. These changes cannot be undone with Ctrl+Z. Save your project before batch-processing.

Batch processing with Editor Utility Blueprints

To standardize pivots across a library, iterate over selected assets in an Editor Utility Blueprint, call one of these functions for each mesh, then save the modified assets.


Next: Return to the Guides overview to continue with the other Pivot Tool workflows.